void main() { int a[2][3] = {1, 2, 3, , 4, 5}; int i = 0, j = 0; for (i = 0; i < 2; i++) for (j = 0; j < 3; j++) printf("%d", a[i][j]); } code example
Example: #include int main() { int n; scanf("%d",&n); int ar[n]; int count=0; for(int i=0;i
whatever by Agreeable Ant
on May 07 2020 Donate
Comment
#include<stdio.h>
int main()
{
int n;
scanf("%d",&n);
int ar[n];
int count=0;
for(int i=0;i<n;i++)
{
scanf("%d",&ar[i]);
}
for(int i=0;i<n;i++)
{
for(int j=0;j<n;j++)
{
if(ar[i]==ar[j])
{
count=count+1;
}
else
{
count=0;
}
}
}
printf("%d\n",(count)/2);
}