Answer:
See explaination
Step-by-step explanation:
#include<iostream>
#include<stdio.h>
#include<math.h>
using namespace std;
double mile(int);
double ft(int);
double degree(int);
int main()
{
int option;
double res;
cout<<"\\ 1. Convert Miles to Kilometers";
cout<<"\\ 2. Convert Feet to Metres";
cout<<"\\ 3. Convert Degrees F to Degrees C";
cout<<"\\ 4. Exit";
cout<<"\\ Enter Your Option: ";
cin>>option;
switch(option)
{
case 1:
int miles;
cout<<"\\ Convert Miles to Kilometres";
cout<<"\\ Enter Miles to convert to Kilometres: ";
cin>>miles;
res = mile(miles);
cout<<"\\ Equivalent of Miles in Kilometres = " <<res;
break;
case 2:
int feet;
cout<<"\\ Convert Feet to Metres";
cout<<"\\ Enter Feet to convert into Metres: ";
cin>>feet;
res = ft(feet);
cout<<"\\ Equivalent of Feet in Metres = " <<res;
break;
case 3:
int degf;
cout<<"\\ Convert Degrees F to Degrees C";
cout<<"\\ Enter Degree in F to convert into Degree C:";
cin>>degf;
res = degree(degf);
cout<<"\\ Equivalent of Farenheit in Celsius = " <<res;
break;
case 4:
cout<<"Bye Bye!!!";
break;
}
}
double mile(int mi)
{
float mile;
mile = 1.609344 * mi;
return mile;
}
double ft(int fe)
{
float ft;
ft = fe / 3.28;
return ft;
}
double degree(int dg)
{
float degree;
degree = (dg - 32) / 1.8;
return degree;
}