Best writers. Best papers. Let professionals take care of your academic papers

Order a similar paper and get 15% discount on your first order with us
Use the following coupon "FIRST15"
ORDER NOW

Not c++ language it is c. wouldn’t let me put c in subject Modify the code to be able to input any number of students (i.e. the loop is controlled by the user input). You will still only have 3 exams for each student. Support your experimentation with screen captures of executing the new code.

Not c++ language it is c. wouldn’t let me put c in subject<br/> <br/>Modify

  1. the code to be able to input any number of students (i.e. the loop is controlled by the user input). You will still only have 3 exams for each student. Support your experimentation with screen captures of executing the new code.

    #include &lt;stdio.h&gt;
    int main(void) {
    // variable declarations:
    char name [100];
    float sum, grade, average;
    int students, exams;
    // loop through 5 students
    for (students = 0; students &lt; 5; students++) {
    printf (“Enter 3 grades and student name: “);
    sum = 0;
    for (exams = 0; exams &lt; 3; exams++) {
    // float uses %f, double uses %lf
    scanf (“%f”, &amp;grade);
    sum = sum + grade;
    } // end for each exam
    average = sum / 3;
    scanf (“%s”, name);
    printf (“Average for %s is %.2f\n”, name, average);
    } // end for each student
    printf(“… Bye …\n”);
    return 0;
    } // end main

 
Looking for a Similar Assignment? Order now and Get 10% Discount! Use Coupon Code "Newclient"