Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- int main()
- {
- int count;
- std::cin>>count;
- count=abs(count);
- int find{-1};
- double* massive=new double[count];
- for (int index{1}; index<=count; ++index) {
- std::cin>>massive[index];
- if(massive[index]<2.5 and find==-1){find=index;}
- }
- if(find!=-1){std::cout<<find<<" "<<massive[find];}
- else{std::cout<<"Not found";}
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement