Advertisement
Guest User

Untitled

a guest
Oct 16th, 2018
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. #include "pch.h"
  2. #include <iostream>
  3.  
  4. using namespace std;
  5.  
  6. float konwersja_na_cale(float meters)
  7. {
  8. return meters * 39.3700787;
  9. }
  10.  
  11. float konwersja_na_stopy(float meters)
  12. {
  13. return meters * 3.28;
  14. }
  15.  
  16. float konwersja_na_jardy(float meters)
  17. {
  18. return meters * 1.09;
  19. }
  20.  
  21. int main()
  22. {
  23. float metry, cale, stopy, jardy;
  24.  
  25. cout << "Podaj ilosc metrow: ";
  26. cin >> metry;
  27.  
  28. cale = konwersja_na_cale(metry);
  29. stopy = konwersja_na_stopy(metry);
  30. jardy = konwersja_na_jardy(metry);
  31.  
  32. cout << "Cale: " << cale << endl;
  33. cout << "Stopy: " << stopy << endl;
  34. cout << "Jardy: " << jardy << endl;
  35.  
  36. return 0;
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement