Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int x;
- cout << "Podaj liczbe od 1 do 7: " ;
- cin >> x;
- if ( x > 7 || x < 1)
- {
- cout << "Podales bledna liczbe." << endl;
- }
- else if ( x == 1)
- {
- cout << "Poniedzialek" << endl;
- }
- else if ( x == 2)
- {
- cout << "Wtorek" << endl;
- }
- else if ( x == 3)
- {
- cout << "Sroda" << endl;
- }
- else if ( x == 4)
- {
- cout << "Czwartek" << endl;
- }
- else if ( x == 5)
- {
- cout << "Piatek" << endl;
- }
- else if ( x == 6)
- {
- cout << "Sobota" << endl;
- }
- else
- {
- cout << "Niedziela" << endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment