A student’s letter grade is calculated according to the following schedule:

Using this information, write a program that accepts a student's numerical grade, converts the numerical grade to an equivalent letter grade, and displays the letter grade.


Answer:

#include
int main()
{
double marks;
printf("Enter the marks: ");
scanf("%lf",&marks);
if(marks>=90){
printf("Grade : 'A'");
}else if(marks<=80){
printf("Grade : 'B'");
}else if(marks<=70){
printf("Grade : 'C'");
}else if(marks<=60){
printf("Grade : 'D'");
}else{
printf("Grade : 'F'");
}
}

Computer Science & Information Technology

You might also like to view...

The stdio.h file contains the definition of EOF.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

With a JIT system, inventory, production resources, and finished products are limited to the right number at the right time as required to fill orders.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

Fields names cannot contain spaces or special characters.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

Which of the following is NOT a data validation stop style?

A) Stop B) Information C) Lookup D) Warning

Computer Science & Information Technology