main()
{
int midterm, final, bribe;
double grade;
cout << "please enter midterm, final and bribe: ";
cin >> midterm >> final >> bribe;
if ( bribe > 50 )
{
grade = 100;
cout << "Thanks!" << endl;
}
else
{
grade = (midterm + final)/2.0;
cout << "Here is your grade: ";
}
cout << grade << endl;
}
Thursday, July 1, 2010
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment