fork download
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main(){
  6.  
  7. int act{0};
  8. char choice{};
  9. float F{0.0};
  10.  
  11. cout << "Choose any activity below that you want to check by entering the" << endl;
  12. cout << "number of your choice." << endl;
  13. cout << "If you do not want to view any actitivies, you may simply choose the number for exit to end the program." << endl;
  14.  
  15. cout << "[1] Activity 1" << endl;
  16. cout << "[2] Activity 2" << endl;
  17. cout << "[3] Activity 3" << endl;
  18. cout << "[4] Activity 4" << endl;
  19. cout << "[5] Activity 5" << endl;
  20. cout << "[6} Exit" << endl;
  21. cin >> act;
  22.  
  23. system("CLS");
  24.  
  25. switch(act){
  26. case 1:
  27. cout<<"Here are the list of activities in this section." <<endl;
  28. cout<<"[A]Conversion of Celsius to Farenheit" << endl;
  29. cout<<"[B]Conversion of Farenhrit to Celsius:" << endl;
  30. cout<<"[C]Solving the area of the square" << endl;
  31. cin >> choice;
  32.  
  33. system("CLS");
  34. if(choice == 'A' || choice == 'a'){
  35. cout << "Celsius to Fahrenheit" ;
  36. cin >> F ;
  37. F = F*9/5+32;
  38. cout << endl;
  39. cout << F ;
  40. }
  41.  
  42. break;
  43. }
  44. }
Success #stdin #stdout #stderr 0s 15240KB
stdin
1
A
0
stdout
Choose any activity below that you want to check by entering the
number of your choice.
If you do not want to view any actitivies, you may simply choose the number for exit to end the program.
[1] Activity 1
[2] Activity 2
[3] Activity 3
[4] Activity 4
[5] Activity 5
[6} Exit
Here are the list of activities in this section.
[A]Conversion of Celsius to Farenheit
[B]Conversion of Farenhrit to Celsius:
[C]Solving the area of the square
Celsius to Fahrenheit
32
stderr
sh: 1: CLS: not found
sh: 1: CLS: not found