In: Computer Science
5. Write a CH program that takes the marks of a student as input and prints the grade on screen according to the following criteria: CRITERIA LESS THAN 60 GREATER THAN 60 BUT LESS THAN 65 GREATER THAN 65 BUT LESS THAN 70 GREATER THAN 70 BUT LESS THAN 75 GREATER THAN 75 BUT LESS THAN 80 GREATER THAN 80 BUT LESS THAN 85 GREATER THAN 85 BUT LESS THAN 90 GREATER THAN 90 GRADE F D D+ с C+ B B+ A
https://www.chegg.com/homework-help/questions-and-answers/5-write-ch-program-takes-marks-student-input-prints-grade-screen-according-following-crite-q58688769
I could'nt understrand the term CH .As in the link you have sent ,it is asking for C++ program so coded in C++.
If you have some problems,you can ask in comments but please don't dislike.
//Code starts here
// Example program
#include <iostream>
using namespace std;
int main()
{
double marks; //Store marks as double
cout << "Enter the marks ";
cin>>marks; //Store input in marks
cout<<"Grade : ";
if( marks<60) //Check for grade F
cout<<"F";
if(marks>=60 && marks<65) //Check for grade D
cout<<"D";
if(marks>=65 && marks<70) //Check for grade D+
cout<<"D+";
if(marks>=70 && marks<75) //Check for grade C
cout<<"C";
if(marks>=75 && marks<80) //Check for grade C+
cout<<"C+";
if(marks>=80 && marks<85) //Check for grade B
cout<<"B";
if(marks>=85 && marks<90) //Check for grade B+
cout<<"B+";
if(marks>=90) //Check for grade A
cout<<"A";
}
//Code ends here
Output for multiple runs