Advertisement
Guest User

Untitled

a guest
Mar 31st, 2020
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. enum cases { enterArray = 1, randomArray = 2, fromFile = 3, exit = 4 };
  2. while (true)
  3. {
  4. cout << "Press 1 to enter array.\n";
  5. cout << "Press 2 to make random array.\n";
  6. cout << "Press 3 to get array from file.\n";
  7. cout << "Press 3 to exit.\n";
  8. int n;
  9. cin >> n;
  10. system("cls");
  11.  
  12. switch (n)
  13. {
  14. case enterArray:
  15.  
  16. break;
  17. case randomArray:
  18.  
  19. break;
  20. case fromFile:
  21.  
  22. break;
  23. case exit:
  24. return;
  25. default:
  26. cout << "Invalid operation. Try again.\n";
  27. system("pause");
  28. system("cls");
  29. }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement