Kacper_Michalak

Zadanie switch 1

Nov 24th, 2020 (edited)
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.55 KB | None | 0 0
  1.  
  2. #include <iostream>
  3. using namespace std;
  4. int main()
  5. {
  6.     int x;
  7.  
  8.     cout << "Podaj numer godziny lekcyjnej" << endl;
  9.     cin >> x;
  10.  
  11.     switch (x)
  12.     {
  13.     case 1:
  14.     case 2:
  15.         cout << "Jezyk angielsi" << endl;
  16.         break;
  17.     case 3:
  18.     case 4:
  19.         cout << "Tworzenie strony internetowych" << endl;
  20.         break;
  21.     case 5:
  22.         cout << "Religia" << endl;
  23.         break;
  24.     case 6:
  25.         cout << "Matematyka" << endl;
  26.         break;
  27.     default:
  28.         cout << "Podano zly numer godzint lekcyjnej"
  29.     }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment