Kacper_Michalak

Seria 2 Zadanie 11

Nov 7th, 2020
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.84 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.     int x;
  8.  
  9.     cout << "Podaj liczbe od 1 do 7: " ;
  10.     cin >> x;
  11.  
  12.     if ( x > 7 || x < 1)
  13.     {
  14.         cout << "Podales bledna liczbe." << endl;
  15.     }
  16.     else if ( x == 1)
  17.         {
  18.            cout << "Poniedzialek" << endl;
  19.         }
  20.       else if ( x == 2)
  21.         {
  22.             cout << "Wtorek" << endl;
  23.         }
  24.           else if ( x == 3)
  25.         {
  26.            cout << "Sroda" << endl;
  27.         }
  28.           else if ( x == 4)
  29.         {
  30.            cout << "Czwartek" << endl;
  31.         }
  32.           else if ( x == 5)
  33.         {
  34.            cout << "Piatek" << endl;
  35.         }
  36.           else if ( x == 6)
  37.         {
  38.             cout << "Sobota" << endl;
  39.         }
  40.         else
  41.         {
  42.             cout << "Niedziela" << endl;
  43.         }
  44.  
  45.  
  46.  
  47.     return 0;
  48. }
  49.  
Advertisement
Add Comment
Please, Sign In to add comment