Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int v[100], n, i, x;
- int main()
- {
- cout<<"n = "; cin>>n;
- for(i = 0; i < n; i++)
- {
- cout<<"v["<<i<<"]= "; cin>>v[i];
- }
- cout<<"x= "; cin>>x;
- int gasit = 0;
- for(i = 0; i < n; i++)
- {
- if(x == v[i])
- gasit = 1;
- }
- if(gasit == 0)
- cout<<" x nu se afla in sir "<<endl;
- else
- cout<<" x se afla in sir "<<endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement