nt sum(int A[], int n){ int sum = 0, i; for(i = 0; i < n; i++) sum = sum + A[i]; return sum;}// sizeof(in code example
Example 1: #include int main() { int x=(20||40)&&(10); printf("%d",x); return 0; }
#include <stdio.h>
int main()
{
int x=(20||40)&&(10);
printf("%d",x);
return 0;
}
Example 2: #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);
}