JamesDamico

BCS 120 - Lab 2

Nov 13th, 2018
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. //Lab 2
  2. void lab2()
  3. {
  4. const double KILOS_TO_MILES_RATE = 0.6213712;
  5.  
  6. double kilos, miles;
  7.  
  8. cout << "Please enter distance traveled in kilos: ";
  9. cin >> kilos;
  10.  
  11. miles = kilos * KILOS_TO_MILES_RATE;
  12.  
  13. cout << "You have traveled: \n" << kilos << " kilos \n" << miles << " miles";
  14.  
  15. return;
  16. }
Add Comment
Please, Sign In to add comment