Home Forums C Programming decision program ?? Re: Re: decision program ??

#3521
GWILouisaxwzkla
Participant

could do:



#include
#include
#include

using namespace std;

int main(void)
{
string name;
string math;
int a;
int d;
char mathGrade;

cout << "Enter name: n";
cin >> name;

cout << "Enter math grade " << name << " got: n";
cin >> mathGrade;
if ( tolower ( mathGrade ) == 'a' || tolower ( mathGrade ) == 'b' || tolower ( mathGrade ) == 'c' )
cout << name << " passed n";
else if ( tolower ( mathGrade ) == 'd' || tolower ( mathGrade ) == 'f' )
cout << name << " failed n";
system("PAUSE");
return 0;
}