You are viewing a single comment's thread. Return to all comments →
int n,x,y=0; scanf("%d",&n); int *point =(int*)malloc(sizeof(int) * n); for(int i = 0; i < n; i++){ scanf("%d",&point[i]); if(point[i]>=point[i+1]) { x=point[i]; point[i]=point[i+1]; point[i+1]=x;} } for(int i = 0; i < n; i++) { if(point[i]=point[i+1]) {y=y+1; } } printf("%d %d",point[0]*2,y);
CAN ANYBODY TELL ME WHAT IS THE PROBLEM IN THIS CODE
Seems like cookies are disabled on this browser, please enable them to open this website
Candy Piles
You are viewing a single comment's thread. Return to all comments →
CAN ANYBODY TELL ME WHAT IS THE PROBLEM IN THIS CODE