Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int dzien;
- cout << "Podaj cyfre od 1 do 7 okreslajaca dzien tygodnia: " << endl;
- cin >> dzien;
- if (dzien>0&&dzien<8)
- {
- if (dzien==1)
- {
- cout << "poniedzialek";
- }
- else if (dzien==2)
- {
- cout << "wtorek";
- }
- else if (dzien==3)
- {
- cout << "sroda";
- }
- else if (dzien==4)
- {
- cout << "czwartek";
- }
- else if (dzien==5)
- {
- cout << "piatek";
- }
- else if (dzien==6)
- {
- cout << "sobota";
- }
- else if (dzien==7)
- {
- cout << "niedziela";
- }
- }
- else
- {
- cout << "Blad! Nie podano cyfry z zakresu 1-7 oznaczajacej numer dnia tygodnia.";
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement