Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <fstream>
- using namespace std;
- int schimb(int a,int b)
- {
- int aux;
- aux=b;
- b=a;
- a=aux;
- }
- int main()
- {
- int a,b,n,i;
- cout<<"n= ";cin>>n;
- for (i=1;i<=n;i++)
- {
- cout<<"a= ";cin>>a;
- cout<<"b= ";cin>>b;
- cout<<schimb(a,b);
- cout<<" ";
- cout<<schimb(b,a)<<'\n';
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement