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.
- Write your code here or upload the screenshot.
- Upload the screenshots of the output.
- Describe the output.
- 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 code include studioh int mainvoi... View full answer
Get step-by-step solutions from verified subject matter experts
