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