Breaking News: Grepper is joining You.com. Read the official announcement!
Check it out

#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); }

Agreeable Ant answered on May 7, 2020 Popularity 8/10 Helpfulness 2/10

Contents


More Related Answers

  • #include<stdio.h> main () { int a; printf("Enter the number:"); scanf("%d",&a); printf("the number was:",a); return 0; }
  • #include <stdio.h> int main (void) { int a, b; printf("Dwse mou dio akeraious arithmous: \n"); scanf("%d %d", &a, &b); printf("Oi arithmoi poy edwses einai: %d kai %d", a, b); return 0; }
  • #include <stdio.h> int main() { char array [100]; scanf("%s", array); printf("%s",array); return 0; }
  • #include <stdio.h> int main() { int x = 10, *y, **z; y = &x; z = &y; printf(""%d %d %d"", *y, **z, *(*z)); return 0; }
  • #include<stdio.h> main() { int *p = 15; printf("%d",*p); }
  • #include<stdio.h> int main() { for(5;2;2) printf("Hello"); return 0; }
  • void main() { int i = 0; if (i == 0) { printf("Hello"); continue; } }
  • #include <stdio.h> int main() { int x = 10, *y, **z; y = &x; z = &y; printf(""%d %d %d"", *y, **z, *(*z)); return 0; }
  • #include <stdio.h> int main() { int x = 10, *y, **z; y = &x; z = &y; printf(""%d %d %d"", *y, **z, *(*z)); return 0; }
  • #include <stdio.h> int main() { int x = 5; if (x = 0) printf("Case 1"); else if(x == 0) printf("Case 2"); else printf("Case 3"); }
  • Int main ( ) { int i,n; cin>>n; i=n; while(i>=1) { i=i+5; i=i-6; } }
  • #include <stdio.h> int main() { int num,i=1; printf("Enter the number whose table you want to print?"); scanf("%d",&num); table: printf("%d x %d = %d\n",num,i,num*i); i++; if(i<=10) goto table; }
  • #include <stdio.h> int main() { int num,i=1; printf("Enter the number whose table you want to print?"); scanf("%d",&num); table: printf("%d x %d = %d\n",num,i,num*i); i++; if(i<=10) goto table; }
  • #include <stdio.h> int main() { int x = 10, *y, **z; y = &x; z = &y; printf(""%d %d %d"", *y, **z, *(*z)); return 0; }
  • #include <stdio.h> int pgcd(int nbr1, int nbr2) { if (nbr2 != 0) return pgcd(nbr2, nbr1%nbr2); else return nbr1; } int main() { int nbr1, nbr2; printf("Entrez deux entiers: "); scanf("%d %d", &nbr1, &nbr2); printf("PGCD de %d et %d = %d", nbr1, nbr2, pgcd
  • int a, b, c, d, e, sum, avg; printf("Enter three numbers:"); scanf("%d", &a); printf("b: "); scanf("%d", &b); printf("c: "); scanf("%d", &c); printf("d: "); scanf("%d", &d); printf("e: "); scanf("%d", &e); sum=a
  • #include <stdio.h> #include <math.h> #include <string.h> #define BASE 2 int main() { int octalcanst[]={0,1,10,11,100,101,110,111,1000,1001,1010,1011,1100,1101,1110,1111}; char hex[65]=""; long long binary,octal , tempoctal , tempbinary, place;
  • #include<stdio.h> int fun( ) { static int num = 10; //static int num; //num = 10; //static => initialized only once -- when program is started ( like global variables ) num++; printf("num = %d\n",num); } int main( ) {
  • #include<stdio.h> static int n; static int k; int b[100]; int *corder(int *s) { int temp; // static int k; b[k]=*s; k++; for(int i=0;i<k;i++) { if(b[i]>temp) { temp=b[i]; printf("%d",temp);
  • find the error #include <stdio.h> #include <math.h> #include <string.h> #define BASE 2 int maximun(int num1,int num2); int minimum(int num1,int num2); int main() { int num1,num2,min,max; printf("input num1 : "); scanf("%d",&num1); printf(
  • #include<stdio.h> void main() { int arr[50],f=-1,r=-1,n,a,b; do{ printf("Press 1 for Enqueue\n2 for Peek\n3 for Dequeue\n4 for exit\n"); scanf("%d",&a); switch (a) { case 1: for(int i=0;i<n;i++){ if(i==0){ prin
  • #include <stdio.h> int main() { int a,b,c; scanf("%d %d%d", &a, &b ,&c); if (a == b && b==c) { printf("No\n"); } else if{a!=b && b!==c && c!==a) printf("No\n"); }else{ printf("Yes"); } return 0; } fix
  • #include <stdio.h> int main() { int x=(20||40)&&(10); printf("%d",x); return 0; }
  • #include int main(){ int i,j; i=j=2,3; while(--i&&j++) printf(%d %d,i,j); return 0; }
  • int main(int c, char *v[]) { char *c; c=v[1] + v[2] + v[3]; printf(“%c”, c); }

  • #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); }

    0
    Popularity 8/10 Helpfulness 2/10 Language whatever
    Source: Grepper
    Tags: int whatever
    Link to this answer
    Share Copy Link
    Contributed on May 07 2020
    Agreeable Ant
    0 Answers  Avg Quality 2/10

    Closely Related Answers



    0
    Popularity 1/10 Helpfulness 1/10 Language whatever
    Source: Grepper
    Link to this answer
    Share Copy Link
    Contributed on Sep 07 2021
    Wild Wolf
    0 Answers  Avg Quality 2/10


    X

    Continue with Google

    By continuing, I agree that I have read and agree to Greppers's Terms of Service and Privacy Policy.
    X
    Grepper Account Login Required

    Oops, You will need to install Grepper and log-in to perform this action.