So you've gpot your code as follow
Code:
{
int num;
printf("enter next score (negative to stop)\n");
scanf("%i",&num);
printf("score is %i \n", num);
return 0;
}
You know the above code will read a value of the user and relay it back to the stdout. Try do this for n number of times. Thats is n being the max number of student for which you need to read the grades. This would be your first assignment. Like
Code:
{
int num;
while ( .... ) {
printf("enter next score (negative to stop)\n");
scanf("%i",&num);
printf("score is %i \n", num);
}
return 0;
}
while syntac is as follow
Code:
while( condition ) while ( n < 10 ) { ... }
{
statment 1;
statment 2;
.
}
Read about loops in C.
Other other hand, you need to make an effort to solve the problem. Or your no where near to getting help on this forum. We would appreciate people working hard to what they desire and will help if your stuck, but not asking us to write the code for you.
ssharish