Advertisement
Guest User

Untitled

a guest
Nov 19th, 2019
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.05 KB | None | 0 0
  1. int kilometers = 0;
  2.     double feet = 0;
  3.     double yards = 0;
  4.     double miles = 0;
  5.  
  6.     cout << "Welcome to Metric Conversions" << endl;
  7.     cout << "We give you the exact measurements you need to build" << endl;
  8.  
  9.     cout << "How many  kilometers do you need" << endl;
  10.     cin >> kilometers;
  11.  
  12.     cout << "We will now start the conversions, please standby while we display your conversions on the screen" << endl;
  13.     cout << "-------------------------------------------------------------------------------------------------" << endl;
  14.  
  15.     feet = kilometers * 3280.83989501312;
  16.     cout << "The number of feet is " << feet << endl;
  17.  
  18.     yards = kilometers * 1093.6132983377078;
  19.     cout << "The number of yards is " << yards << endl;
  20.  
  21.     miles = kilometers * 0.621371192237334;
  22.     cout << "The number of miles is " << miles << endl;
  23.  
  24.     cout << "-------------------------------------------------------------------------------------------------" << endl;
  25.  
  26.     cout << "Your desired conversions are now displayed on the screen!" << endl;
  27.     cout << "Thank you for stopping by,have a good day!" << endl;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement