Advertisement
rootuss

funkcja

Nov 13th, 2016
258
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.52 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. float na_cale(float m)
  6. {
  7.     return m*39.37;
  8. }
  9.  
  10. float na_jardy(float m)
  11. {
  12.     return m*1.0936;
  13. }
  14.  
  15. void na_mile(float m)
  16. {
  17.     //float wynik=m*.0006213;
  18.     //cout<<"W calach: "<<wynik <<endl;
  19.  
  20.     cout<<"W calach: "<< m*.0006213<<endl;
  21. }
  22.  
  23. int main()
  24.  
  25. {
  26.     float metry;
  27.     cout << "Podaj liczbe metrow: " ;
  28.     cin>>metry;
  29.  
  30.     cout<<"W calach: "<<na_cale(metry)<<endl;
  31.     cout<<"W milach: "<<na_jardy(metry)<<endl;
  32.  
  33.     na_mile(metry);
  34.  
  35.  
  36.     return 0;
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement