I have written the code in C++
==========================================================================================
#include <iostream>
using namespace std;
int main()
{
double inp, ans; //Variables for input and answer
int ch; //Choice for Menu
double mile_fac = 0.621, f_fac = 1.8, pound_fac = 2.205, gall_fac =
0.264; //Declaring all constants
char run = 'y';
do
{
cout << "\n\n1. Kilometres to Miles";
cout << "\n2. Celsius to Fahrenheit";
cout << "\n3. Kilograms to Pounds";
cout << "\n4. Litres to Gallons";
cout << "\n\nEnter option number:";
cin >> ch;
switch(ch)
{
case 1: cout<<"\nEnter Value in km:";
cin>>inp;
ans = inp * mile_fac; //miles = km * 0.621
cout<<"\n\nMiles: "<<ans;
break;
case 2: cout<<"\nEnter Value in Celsius:";
cin>>inp;
ans = inp * f_fac + 32; //F = 32 + 1.8 * C
cout<<"\n\nFahrenheit: "<<ans;
break;
case 3: cout<<"\nEnter Value in kg:";
cin>>inp;
ans = inp * pound_fac; // pounds = kg * 2.205
cout<<"\n\nPounds: "<<ans;
break;
case 4: cout<<"\nEnter Value in Litres:";
cin>>inp;
ans = inp * gall_fac; // gallons = litres * 0.264
cout<<"\n\nGallons: "<<ans;
break;
default: cout<<"\n\nINCORRECT OPTION NUMBER";
}
cout<<"\n\nDo you wish to re-run(Y/N)?:";
cin>>run;
}while(run == 'y' || run == 'Y');
return 0;
}
==========================================================================================
If you liked the answer, please upvote :D, and if you have any queries, do leave a comment. Thank you!
Instructions Cuba, like much of the world uses the metric system. Write a program to input...