WiktorJagielski

Zad 14

Mar 30th, 2020
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. #include <iostream>
  2.  
  3.  
  4. using namespace std;
  5. int ZAMIANA(float a,float b)
  6.  
  7. {
  8. float c;float d;
  9. c=a;
  10. d=b;
  11. a=b;
  12. b=a;
  13. cout << "Pierwsza liczba to: " << d << endl;
  14. cout << "Druga liczba to: " << c << endl;
  15. }
  16. int main()
  17. {
  18. float a;
  19. float b;
  20. float c;
  21. float d;
  22.  
  23. cout << "Podaj pierwsza liczbe: ";
  24. cin >>a;
  25. cout << "Podaj druga liczbe: ";
  26. cin >>b;
  27. cout << "Zamienione liczby to: "<< endl;
  28. ZAMIANA(a,b);
  29.  
  30.  
  31. return 0;
  32. }
Advertisement
Add Comment
Please, Sign In to add comment