C program to count integers
I have been given an assignment to write a program where the user inputs 10000 integers, and the program counts how many 1s, 2s, etc up to 99s there are, and then how many are out of range (<=100). The hint was to use an array, but my teacher is terrible and no one in there has figured it out as of yet. I've never programmed before. So far, we have covered if statements, for loops, and he mentioned while and do...while loops, but I don't think I'm supposed to use that. He also sort of explained what an array is.
I'm not asking for a handout, if someone could just point me in the right direction, with a little explanation...
Code:
#include <stdio.h>
int input_number(int a);
int main(void)
{
int out_of_range=0;
int count;
int numbers[10000];
int b;
for (count==1;count==10000;count++)
{
for (b=0;b<100;b++)
{
if (input_number<100)
{
}
else
{
out_of_range++;
}
printf("There are %d integers that are out of range",out_of_range);
printf("There are %d %ds",??,??);
}
return 0;
}
int input_number
{
int a;
printf("Input a positive integer greater than 0");
scanf("%d",&a);
return a;
}
I should also mention that he claimed he could do this with only one if statement. I'm not entirely sure I should use nested for loops, but it seemed to make sense, I'm just not sure how to tell the computer to separate and count the 1s, 2s, etc.