Question: Create a C program that will ask for a grade and display the remarks based on the given grade. The remarks are based on the

Create a C program that will ask for a grade and display the remarks based on the given grade. The remarks are based on the table below:

GRADE RANGE
 REMARKS
98 - above
 Excellent
90 - 97
 Very Good
80 - 89
Good
 75 - 79
 Passed
below 75 Failed

Just apply whichever logical operator is applicable.

  1. Write your code here or upload the screenshot.
  2. Upload the screenshots of the output. 
  3. Describe the output.
  4. Write your analysis of the program in terms of how you were able to solve the problem 

Here is the code that applies some logical operator on this.


#include


int main()

{

    int grade;

    

    printf("Enter grade:");

    scanf("%d", &grade);

    if(grade >=98)

    {

        printf("Excellent!");

    }

    else

    {

        if(grade>=90)

        {

            printf("Very Good!"); 

        }

        else

        {

            if(grade>=80)

            {

                printf("Good!");

            }

            else

            {

                if(grade>=75)

                {

                    printf("Passed!");

                }

                else

                {

                    printf("Failed!");

                }

                }

            }

            }

}




Step by Step Solution

3.41 Rating (154 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

1 code include studioh int mainvoi... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!