Advertisement
Guest User

Untitled

a guest
Mar 30th, 2020
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.23 KB | None | 0 0
  1. #include <iostream>
  2. #include <Windows.h>
  3. #include <stdlib.h>
  4. using namespace std;
  5. int x, y, z, wybor;
  6. int main()
  7. {
  8.    
  9.     string nazwa,haslo;
  10.     poczatek:
  11.     system("color A");
  12.     system("cls");
  13.     cout << "1.Chce stworzyc nowe konto" << endl;
  14.     cout << "2.Chce usunac istniejace konto" << endl;
  15.     cout << "3.Chce zmienic/ustawic haslo w istniejacym koncie" << endl;
  16.     cout << "4.Wyjscie z programu" << endl;
  17.     cin >> wybor;
  18.         if (wybor == 1)
  19.         {
  20.             cout << "Podaj nazwe konta:" << endl;
  21.             cin >> nazwa;
  22.             cout << "Podaj haslo (jezeli nie chcesz to nic nie wpisuj):" << endl;
  23.             cin >> haslo;
  24.             string command = "net user " + nazwa + haslo + " /add";
  25.             system(command.c_str());
  26.             system("pause");
  27.             goto poczatek;
  28.         }
  29.         else if (wybor == 2)
  30.         {
  31.             cout << "Podaj nazwe konta:" << endl;
  32.             cin >> nazwa;
  33.             string command = "net user " + nazwa + " /del";
  34.             system(command.c_str());
  35.             system("pause");
  36.             goto poczatek;
  37.         }
  38.         else if (wybor == 3)
  39.         {
  40.             cout << "Podaj nazwe konta:" << endl;
  41.             cin >> nazwa;
  42.             cout << "Podaj haslo:" << endl;
  43.             cin >> haslo;
  44.             string command = "net user " + nazwa + " /del";
  45.             system(command.c_str());
  46.             system("pause");
  47.             goto poczatek;
  48.         }
  49.         else
  50.         {
  51.             system("exit");
  52.         }
  53.    
  54. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement