Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int Zapros(int massiv[],int &b){
- int a = 0;
- while(10 > a)
- {
- cout << "Vvedite cacoeto chislo:";
- cin >> massiv[a];
- a++;
- }
- cout << "A teper vvedite nomer svoeu schkolu:";
- cin >> b;
- }
- int Obrachunok(int &kolichestvo, int index,int masiv[]){
- while (10 > kolichestvo)
- {
- if(masiv[kolichestvo] == index)
- {
- return 1;
- }
- kolichestvo++;
- }
- return 0;
- }
- int main()
- {
- int index = 0,kolichestvo = 0;
- int stat[10];
- Zapros(stat,index);
- Obrachunok(kolichestvo,index,stat);
- if(kolichestvo == 1)
- {
- cout << "Ya znau etu sckolu!";
- }else{
- cout << "Ya ne snau etu scholu :(";
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement