Untitled1 - cout<<"Your...

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&lt;&lt;&quot;Your average is&quot;&lt;&lt;e&lt;&lt;&quot; and you got B-.&quot;; else if ( e &gt;= 76.1 &amp;&amp; e &lt;= 79.5 ) cout&lt;&lt;&quot;Your average is&quot;&lt;&lt;e&lt;&lt;&quot; and you got C+.&quot;; else if ( e &gt;= 74.5 &amp;&amp; e &lt;= 76 ) cout&lt;&lt;&quot;Your average is&quot;&lt;&lt;e&lt;&lt;&quot; and you got C-.&quot;; else if ( e &gt;= 0 &amp;&amp; e &lt;= 74.4 ) cout&lt;&lt;&quot;Your average is&quot;&lt;&lt;e&lt;&lt;&quot; and you got C-.&quot;; else if ( e &gt; 100 ) cout&lt;&lt;&quot;ERROR.&quot;; }...
View Full Document

Ask a homework question - tutors are online