fork download
  1. #include<iostream>
  2. using namespace std;
  3. void main()
  4. {
  5. int quality_points(int);
  6. int grade;
  7. for(int i =1; i<=5; i++)
  8. {
  9. cout<<"Enter the grade "<<endl;
  10. cin>>grade;
  11. cout<<"on the scale from 0 to 4 "
  12. <<"The quality points of "<<grade<<" = "
  13. <<quality_points(grade)<<endl;
  14. }
  15. }
  16. int quality_points(int average)
  17. {
  18. if(average>=90)
  19. return 4;
  20. else if(average>=80)
  21. return 3;
  22. else if(average >= 70)
  23. return 2;
  24. else if(average>= 60)
  25. return 1;
  26. else
  27. return 0;
  28. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:3:11: error: ‘::main’ must return ‘int’
 void main()
           ^
stdout
Standard output is empty