Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <Windows.h>
- #include <stdlib.h>
- using namespace std;
- int x, y, z, wybor;
- int main()
- {
- string nazwa,haslo;
- poczatek:
- system("color A");
- system("cls");
- cout << "1.Chce stworzyc nowe konto" << endl;
- cout << "2.Chce usunac istniejace konto" << endl;
- cout << "3.Chce zmienic/ustawic haslo w istniejacym koncie" << endl;
- cout << "4.Wyjscie z programu" << endl;
- cin >> wybor;
- if (wybor == 1)
- {
- cout << "Podaj nazwe konta:" << endl;
- cin >> nazwa;
- cout << "Podaj haslo (jezeli nie chcesz to nic nie wpisuj):" << endl;
- cin >> haslo;
- string command = "net user " + nazwa + haslo + " /add";
- system(command.c_str());
- system("pause");
- goto poczatek;
- }
- else if (wybor == 2)
- {
- cout << "Podaj nazwe konta:" << endl;
- cin >> nazwa;
- string command = "net user " + nazwa + " /del";
- system(command.c_str());
- system("pause");
- goto poczatek;
- }
- else if (wybor == 3)
- {
- cout << "Podaj nazwe konta:" << endl;
- cin >> nazwa;
- cout << "Podaj haslo:" << endl;
- cin >> haslo;
- string command = "net user " + nazwa + " /del";
- system(command.c_str());
- system("pause");
- goto poczatek;
- }
- else
- {
- system("exit");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement