Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- void schools(int a[])
- {
- for (int i=0; i<10; i++)
- {
- cout << "Vvedi nomer shkoli luboi: ";
- cin >> a[i];
- cout << endl;
- }
- }
- void poisk_school(int a[],int ichem_school,bool&znau)
- {
- for (int i=0; i<10; i++)
- {
- if (ichem_school==a[i])
- {
- znau=true;
- cout << "Ja znaiu tvoi shkolu";
- break;
- }
- }
- }
- int main()
- {
- int school[10];
- int yshool;
- bool znau = false;
- schools(school);
- cout << "Vvedi nomer tvoie school: ";
- cin >> yshool;
- poisk_school(school,yshool,znau);
- if (znau==false)
- cout<< "Ne znau tvoi shkolu";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement