Advertisement
Gireada

POO 2 3 (2)

Mar 8th, 2017
244
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.43 KB | None | 0 0
  1. #include <iostream>
  2. #include <conio.h>
  3. #include <iomanip>
  4.  
  5. using namespace std;
  6.  
  7. char parola[20];
  8.  
  9. istream& da_parola(istream& cin)
  10. {
  11.     cout << "Introduceti parola";
  12.     cin >> parola;
  13.     return cin;
  14. }
  15.  
  16. ostream& da_bip(ostream& cout)
  17. {
  18.     return cout <<'\a';
  19. }
  20.  
  21. int main()
  22. {
  23.     cin >> da_parola;
  24.     cout << endl;
  25.     if (strcmp(parola, "parola") == 0)
  26.         cout << "Corect";
  27.     else
  28.         cout << da_bip << endl;
  29.     system("pause");
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement