MarcinKrol

Zad14

Mar 24th, 2020
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. //Zad14
  4.  
  5.  
  6. using namespace std;
  7.  
  8. int a,b,c;
  9. void zmiana(int &a, int &b)
  10. {
  11. c=a;
  12. a=b;
  13. b=c;
  14. cout<<a<<", "<<b<< endl;
  15. }
  16.  
  17. int main()
  18. {
  19.  
  20. cout << "Podaj dwie liczby: ";
  21. cin >> a >> b;
  22. zmiana(a,b);
  23. return 0;
  24. }
Advertisement
Add Comment
Please, Sign In to add comment