once more i need you help! I need to write a C program that imputs 5 numbers between 1 and 30 and returns the corresponding number of adjacent asterisks. I cannot use neither the do...while nor the array functions because i haven't studied them yet.
I have tried varius combinations like the for loop followed by nested if statements to test if the numbers are included between 1 and 30,but it doesn't work.
I don't get how to connect the testing part with the printing of the asterisks.
I don't want you to do my homework, i would only like you to give me some hints on how to proceed after the for loop statement.
Here is what i have (just the beginning,i know...):
int main( void ) /* function main begins program execution */
int num1, num2, num3, num4, num5, x;
printf( "Enter five numbers between 1 and 30:" );
scanf_s( "%d%d%d%d%d", num1, num2, num3, num4, num5 );
for ( x = 1; x <= 5; x++ );
Thank you in advance for your help,
0 · ·