Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cstdio>
- //#include <algorithm>
- //#include <cmath>
- //#include <ctime>
- //#include <string>
- //#include <cstdlib>
- //#define ll long long int
- //#define TESTCASE int t;scanf("%d", &t);for(int i = 0; i < t; i++)
- //#define PF printf
- //#define SF scanf
- #define STDIN freopen("in.txt", "rt" , stdin);
- //#define STDOUT freopen("out.txt", "wt", stdout);
- using namespace std;
- int array[10000000];
- int main()
- {
- int numberToSearch = -5, n = 100;
- //cin >> numberToSearch;
- STDIN
- int num, index = 0;
- bool flag = false;
- while(cin >> num)
- array[index++] = num;
- //int start_time = clock();
- for(int i = 0; i < n; i++)
- {
- if(array[i] == numberToSearch)
- {
- flag = true;
- break;
- }
- }
- //int end_time = clock();
- if(flag) cout << "Found" << endl;
- else cout << "Not Found" << endl;
- return 0;
- }
Add Comment
Please, Sign In to add comment