Advertisement
Guest User

Untitled

a guest
Nov 23rd, 2014
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.41 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6.     char znak;
  7.     int b = 0;
  8.     int a = 0;
  9.     int j = 0;
  10.     int t = 0;
  11.  
  12.     cout << "Wprowadz 4 dowolne znaki:" << endl;
  13.     while (b < 1 || a < 1 || j < 1 || t < 1)
  14.     {
  15.  
  16.         cin >> znak;
  17.  
  18.         if (znak == 'b') b++;
  19.         if (znak == 'a') a++;
  20.         if (znak == 'j') j++;
  21.         if (znak == 't') t++;
  22.        
  23.         cout << endl;
  24.     }
  25.     cout << " da sie";
  26.    
  27.     system("pause");
  28.  
  29.  
  30.  
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement