Create a C program that will ask for a grade and display the remarks based on the
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 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!");
}
}
}
}
}
Applied Statistics in Business and Economics
ISBN: 978-0073521480
4th edition
Authors: David Doane, Lori Seward