Advertisement
Guest User

Untitled

a guest
Mar 24th, 2019
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. int wybranaopcja = 0;
  2. while (wybranaopcja != 4)
  3. {
  4. system("cls");
  5. if (wybranaopcja == 0) cout << "-->1\n";
  6. else cout << "1\n";
  7.  
  8. if (wybranaopcja == 1) cout << "-->2\n";
  9. else cout << "2\n";
  10.  
  11. if (wybranaopcja == 2) cout << "-->2\n";
  12. else cout << "2\n";
  13.  
  14. if (wybranaopcja == 3) cout << "-->Wyjscie\n";
  15. else cout << "Wyjscie \n";
  16.  
  17. znak = _getch();
  18.  
  19. switch (znak)
  20. {
  21. case 72:
  22. wybranaopcja--;
  23. break;
  24. case 80:
  25. wybranaopcja++;
  26. break;
  27. case 13:
  28. switch (wybranaopcja)
  29. {
  30. case 0:
  31. break;
  32. case 1:
  33. break;
  34. case 2:
  35. break;
  36. case 3:
  37. return 0;
  38. }
  39. }
  40. if (wybranaopcja < 0) wybranaopcja++;
  41.  
  42. if (wybranaopcja > 3) wybranaopcja--;
  43.  
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement