Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- bool szukaj(float T[],int n)
- {
- for(int i=0;i<n;i++)
- {
- if(T[i]!=2)return true;
- }
- return false;
- }
- int main()
- {
- int n;
- cout<<"Ile liczb: ";cin>>n;
- float *T = new float[n];
- for(int i=0;i<n;i++)
- {
- cout<<"Podaj "<<i+1<<" element: ";cin>>T[i];
- }
- if(szukaj(T,n)==true)cout<<"Znajduje sie";
- else cout<<"Nie znajduje sie";
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement