Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- float v[1000];
- unsigned n,i,st,dr;
- cout<<"n=";cin>>n;
- for (i=0;i<n;i++)
- cin>>v[i];
- st=0;dr=n-1;
- while (st<dr)
- {
- if ((int)v[st]==(int)v[dr])
- cout<<v[st]<<' '<<v[dr]<<endl;
- st++;
- dr--;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement