/****************************************************/ /* Program to determine c
ID: 3609614 • Letter: #
Question
/****************************************************/
/* Program to determine coursegrade */
/* */
/* Inputs:(keyboard) */
/* 1. Float - weighted total points (<=100) */
/* */
/*Output: */
/* letter grade using pseudocode gradingpolicy */
/* */
/* Algorithm: Comparisons usingif-then-else */
/* */
/****************************************************/
#include <iostream>
using namespace std ;
int main()
{
Declare score and grade appropriately asvariables.
// read in total score
cout << endl ;
cout << "Enter total score (float,must be <= 100) : " ;
cin >> score ;
Write C++ if-then-else statements todetermine course grade,
using the grading policy stated in the pseudocode.
// display the result
cout << endl ;
cout << "Your grade for CMIS 102 is:" << grade << endl ;
return (0); // terminate withsuccess
}
Thanks for the help in advance
Explanation / Answer
if(score<=100 &&score>=90)
grade='A';
else if(score<90 && score>=80 )
grade='B';
else if(score<80 && score>=70)
grade='C';
else if(score<70 && score>=60)
grade='D';
else
grade='F';
cout<<endl;
cout<<"Your grade for CMIS 102is:"<<grade<<endl;
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.