fork download
  1. #include<iostream>
  2. #include<math.h>
  3. using namespace std;
  4. int main(){
  5. int m1,m2,m3,total;
  6. float Avg;
  7. cout<<"enter marks of 3 subjects"<<endl;
  8. cin>>m1>>m2>>m3;
  9. total=m1 + m2 + m3;
  10. Avg = total/3.0;
  11.  
  12. if(Avg>=60)
  13. cout<<"a"<<endl;
  14. else if(Avg>=35&&Avg<60)
  15. cout<<"b"<<endl;
  16. else
  17. cout<<"c"<<endl;
  18.  
  19.  
  20. return 0;
  21. }
Success #stdin #stdout 0.01s 5520KB
stdin
100
stdout
enter marks of 3 subjects
a