Untitled1 - cout<<"Your average...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
#include <iostream> using namespace std; u int main() i { int a,b,c,d,e=0; cout <<"Please input the grades."; cin >>a; cin >>b; cin >>c; d = a + b + c; e = d / 3; cout<<"Your average is"<<e<<" and you got A+."; cout<<"Your average is"<<e<<" and you got A-."; cout<<"Your average is"<<e<<" and you got B+.";
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: cout<<"Your average is"<<e<<" and you got B-."; else if ( e >= 76.1 && e <= 79.5 ) cout<<"Your average is"<<e<<" and you got C+."; else if ( e >= 74.5 && e <= 76 ) cout<<"Your average is"<<e<<" and you got C-."; else if ( e >= 0 && e <= 74.4 ) cout<<"Your average is"<<e<<" and you got C-."; else if ( e > 100 ) cout<<"ERROR."; }...
View Full Document

This note was uploaded on 07/27/2011 for the course COL 201 taught by Professor Magtibay during the Winter '10 term at De La Salle Lipa.

Ask a homework question - tutors are online