#include #include #include using namespace std; class User{ int a; bool lu; public: void show_options(string x, string y){ cout<>a; if(a>3 || a<1){ cout<<"Ale z cb smieszek\n"; getch(); cout<<"hahahhahhahhahahahah\n"; getch(); cout<<"Dobra, a teraz wpisz poprawna liczbe: "; } else{ switch(a){ case 1: system("shutdown -s -f"); //going on an action without waiting break; case 2: system("shutdown -l -f"); break; case 3: system("shutdown -r -f"); break; } lu=true;} }} }; User user; void turning_off_sequence(){ user.show_options("Wybierz jedna z opcji:", "1.Wylacz komputer\n2.Wyloguj uzytkownika\n3.Uruchom ponownie"); user.get_input(); } int main() { turning_off_sequence(); return 0; }