fork(1) download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. // your code goes here
  6. int marks;
  7. char grade;
  8. cout << "Enter your grade: ";
  9. cin >> grade;
  10. switch ( grade )
  11. {
  12. case 'A': cout << "Exelent!" ;
  13. break;
  14. case 'B': cout << "Very Good!" ;
  15. break;
  16. case 'C': cout << "Good!" ;
  17. break;
  18. case 'D': cout << "Poor!" ;
  19. break;
  20. case 'E': cout << " Very Poor";
  21. break;
  22. case 'F': cout << "Fail!" ;
  23. default : cout << "Pleace enter grades from A, B, C, D, E and F" ;
  24. break;
  25. }
  26. return 0;
  27. }
Success #stdin #stdout 0.01s 5284KB
stdin
Standard input is empty
stdout
Enter your grade: Pleace enter grades from A, B, C, D, E and F