Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "pch.h"
- #include <iostream>
- #include <cstdlib>
- #include <ctime>
- #include <algorithm>
- #define N 10
- using namespace std;
- int main()
- {
- int tab[N];
- srand(time(NULL));
- for (int i = 0; i < N; i++)
- {
- tab[i] = rand() % 100 + 1;
- cout << tab[i]<<" ";
- }
- int Min;
- cin >> Min;
- for (int i = 0; i < N; i++)
- {
- if (Min == tab[i])
- {
- cout << "Tak" << endl;
- return 0;
- }
- }
- cout << "Nie" << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement