Problems in your to-do list | Problem - 48 | Beginner level | C language | CodeChef
Link to the problem statement: https://www.codechef.com/submit/TODOLIST
Solution:
#include <stdio.h>
int main(void) {
int t, n, i, j;
scanf("%d", &t);
for(i=0;i<t;i++)
{
scanf("%d", &n);
int b=0, a[n];
for(j=0;j<n;j++)
{
scanf("%d", &a[j]);
if(a[j]>=1000)
b++;
else
continue;
}
printf("%d\n", b);
}
return 0;
}
Hope this will help you, if you want anything else leave a comment.
Thank you
Comments
Post a Comment