Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

In the following program, what additional syntax is needed to ensure that two pr

ID: 3768490 • Letter: I

Question

In the following program, what additional syntax is needed to ensure that two printf statements in the if structure shown will be executed when the condition is false (i.e., when grade < 60). Please make the change right in the code itself.

#include <stdio.h>
void main (void)
{

     int grade;

     printf ("Enter student grade: ");
     scanf ("%i", &grade);

     if (grade > 100)

          printf ("Invalid Grade. ");
          printf ("Please Re-enter ");

      else if (grade < 0)

          printf ("Too Low! ");
          printf ("Enter it again!");
  

}

Explanation / Answer

if (!(grade > 100))
{
          printf ("Invalid Grade. ");
          printf ("Please Re-enter ");

}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote