evgenko

масив(а)

May 31st, 2016
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.52 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.     int school[10];
  8.     int yshool;
  9.     bool znau = false;
  10.     for (int i=0; i<10; i++)
  11.     {
  12.         cout << "Vvedi nomer shkoli luboi: ";
  13.         cin >> school[i];
  14.         cout << endl;
  15.     }
  16.     cout << "Vvedi nomer tvoie school: ";
  17.     cin >> yshool;
  18.  
  19.     for (int i=0; i<10; i++)
  20.     {
  21.         if (yshool==school[i]){
  22.         znau=true;
  23.         cout << "Ja znaiu tvoi shkolu";}
  24.     }
  25.     if (znau==false)
  26.     cout<< "Ne znau tvoi shkolu";
  27.  
  28.  
  29.  
  30. }
Add Comment
Please, Sign In to add comment