Thursday, June 3, 2021

C++ program check the grade and give the statement (POP) (106)

#include<iostream>

using namespace std;

int main()

{

char ch;

cout<<"please enter the grade:";

cin>>ch;

switch(ch)

{

caseA:

cout<<"average";

break;

caseE:

cout<<"excellence";

break;

casev:

cout<<"very good";

break;

caseG:

cout<<"good";

break;

caseF:

cout<<"fail";

break;

default:

cout<<"you enter a wrong grade:";

break;

}

} 

No comments:

Post a Comment