Beginner to C. Starting a gradebook application -
#include <stdio.h> int main(void) { int numstudents; int = 0 ; printf("how many students in class? \n"); scanf("%d", &numstudents); int grade[numstudents]; while ( > numstudents ){ scanf("%d", &grade[i]); printf("\n"); i++; } }
what want number of students , allow many scanners grades. thanks.
while ( > numstudents ){ scanf("%d", &grade[i]); printf("\n"); i++; }
your while
condition backwards; loop body never execute.
Comments
Post a Comment