- Write A C Program To Generate A Table Of Conversions From Kilometres To Miles Or Miles To Kilometres Based On The User 1 (34.85 KiB) Viewed 45 times
Write a C++ program to generate a table of conversions from kilometres to miles or miles to kilometres based on the user
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
Write a C++ program to generate a table of conversions from kilometres to miles or miles to kilometres based on the user
Write a C++ program to generate a table of conversions from kilometres to miles or miles to kilometres based on the user input. If the user inputs 'K' or 'k' your program should produce kilometres to miles conversion. If the user inputs 'M' or 'm' your program should produce miles to kilometres conversion. Your program should also prompt the user to enter the starting value, ending value and the step size. Replace MY NAME with your name and 1234567890 with your ID no in the sample output shown Sample outputs are shown in the next page. Formulae: mile = 1.609344 kilometre kilometre = 0.621371 miles Use switch-case and while loop in your program. Note: Each line of your code should have appropriate comments.