Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int a,b,c;
- void zamiana(int a,int b)
- {
- a=a+b;
- b=a-b;
- a=a-b;
- cout<<a<<endl;
- cout<<b<<endl;
- }
- int main()
- {
- cout<<"podaj dwie liczby do zamiany"<<endl;
- cin >> a;
- cin >> b;
- cout<<"liczby po zamianie miejscami"<<endl;
- zamiana(a,b);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement