program to find out how many of the numbers from 1 to 10 are greater than 3



#include

int main()
{
int i;
int count = 0;

for(i = 1; i <= 10; i = i + 1)
{ if(i > 3)
count = count + 1;
}

printf("%d numbers were greater than 3\n", count);

return 0;
}




No comments:

Post a Comment