#include <iostream>
#include <iomanip>
#include <stdlib.h>
usingnamespace std;
//functions
int Menu();
int UserChoice();
//Global Menu Choices
constint Centimeter=1;
//End menu Choices
//Centi menu
constint Meter2=1;
constint In2=2;
constint Ft2=3;
//Global
int Choice; //Menu Choice
int choice2;
longdouble Pi=3.1415926535;
double MeterInput;
float InchInput;
double FeetInput;
double CentimeterOut;
//End global
int main()
{
int q;
Menu();
UserChoice();
cin>>q;
return 0;
}
int Menu()
{
//The Menu
cout<<"\t\tPlease Make a Choice:\n\n"
<<"1. Convert to Centimeters\n\n"
<<"Enter your choice: ";
cin>>Choice;
//Clear the screen
system ("cls");
}
int UserChoice()
{
//cout<<setiosflags(ios::fixed)<<setprecision(2);
switch (Choice)
{
case Centimeter:
cout<<"\t\tPlease Make a Choice:\n\n"
<<"1. Meters\n"
<<"2. Inches\n"
<<"3. Feet\n\n"
<<"Enter your choice: ";
cin>>choice2;
cout<<endl;
//Clear the screen
system ("cls");
switch (choice2)
{
case Meter2:
cout<<"Please enter a meter: ";
cin>>MeterInput;
cout<<endl;
CentimeterOut=MeterInput*100; //calculation
if (MeterInput=1)
{
cout<<MeterInput<<" meter is "<<CentimeterOut<<" centimeters"<<endl;
}
elseif (CentimeterOut=1)
{
cout<<MeterInput<<" meters is "<<CentimeterOut<<" centimeter"<<endl;
}
else
{
cout<<MeterInput<<" meters is "<<CentimeterOut<<" centimeters"<<endl;
}
break;
case In2:
cout<<"Please enter a Inch: ";
cin>>InchInput;
cout<<endl;
CentimeterOut=InchInput*2.54; //calculation
if (InchInput=1)
{
cout<<InchInput<<" inche is "<<CentimeterOut<<" centimeters"<<endl;
}
elseif (CentimeterOut=1)
{
cout<<InchInput<<" inches is "<<CentimeterOut<<" centimeter"<<endl;
}
else
{
cout<<InchInput<<" inches is "<<CentimeterOut<<" centimeters"<<endl;
}
break;
}
}
}