You are on page 1of 5

#include <iostream>

#include <string>
using namespace std;

int question = 1;

int main()
{

do
{
int MetricSystem = 1;
int Temperature = 2;
int DataMeasurement = 3;
int Currency = 4;
int number;

cout << "****************************" << endl;


cout << "Welcome To Converters System" << endl;
cout << "****************************" << endl;
cout << "1- ( cm to m , m to km , km to cm ) " << endl;
cout << "2- ( F to C , C to F )" << endl;
cout << "3- ( KB to MB , MB to KB )" << endl;
cout << "4- ( IQD to USD , USD to Euro )" << endl;

// which part you want ?


cout << "Enter Number Of This part you want: ";
cin >> number;

//for Metric System part.


if (number == 1)
{
int cm = 1;
int m = 2;
int km = 3;

int enter;
cout << "****************************" << endl;
cout << "Welcome To Metric System" << endl;
cout << "****************************" << endl;
cout << "1- cm to m" << endl;
cout << "2- m to km" << endl;
cout << "3- km to cm" << endl;

//which part you want in metric system?


cout << "Enter Number Of This part you want: ";
cin >> enter;

//to change Cm --> M


if (enter == 1)
{
float cm;
float me;
cout << "enter CM: ";
cin >> cm;
me = cm / 100;
cout << cm << "cm in meter = " << me << endl;

//if you want run again this programm please press number 1
and press any number for exit.
cout << "do you want any more" << endl;
cout << "1 for continue and press any number for exit" <<
endl;
cin >> question;

//to change M --> KM


if (enter == 2)
{
float m;
float km;

cout << "enter M: ";


cin >> m;

km = m / 1000;

cout << m << "m in km = " << km << endl;

cout << "do you want any more" << endl;


cout << "1 for continue and press any number for exit" <<
endl;
cin >> question;

}
//to change KM --> Cm
if (enter == 3)
{
float K;
float c;
cout << "enter KM: ";
cin >> K;
c = K / 100000;
cout << K << "km in cm = " << c << endl;

cout << "do you want any more" << endl;


cout << "1 for continue and press any number for exit" <<
endl;
cin >> question;

}
}
// Temperature part.
if (number == 2)
{
int C = 1;
int F = 2;
int enter;

cout << "****************************" << endl;


cout << "Welcome To Temprature System" << endl;
cout << "****************************" << endl;
cout << "1- C to F" << endl;
cout << "2- F to C" << endl;

cout << "Enter Number Of This part you want: ";


cin >> enter;
//to change C --> F
if (enter == 1)
{
float Cil;
float fa;

cout << "enter temprature in celsius: ";


cin >> Cil;
fa = (Cil * 9 / 5) + 32;
cout << Cil << "C to F = " << fa << endl;

cout << "do you want any more" << endl;


cout << "1 for continue and press any button for exit" <<
endl;
cin >> question;

}
//to change F --> C
if (enter == 2)
{
float fah;
float ci;

cout << "enter temprature in fahrenheit: ";


cin >> fah;
ci = (fah - 32) * 5 / 9;
cout << fah << "F to C = " << ci << endl;

cout << "do you want any more" << endl;


cout << "1 for continue and press any button for exit" <<
endl;
cin >> question;

}
}
// Data Measurement Part.
if (number == 3)
{
int kb = 1;
int mb = 2;
int enter;
cout << "**********************************" << endl;
cout << "Welcome To Data Measurement System" << endl;
cout << "**********************************" << endl;
cout << "1- KB to MB" << endl;
cout << "2- MB to KB" << endl;

cout << "Enter Number Of This part you want: ";


cin >> enter;

//to chnage KB --> MB


if (enter == 1)
{
float kb;
float mb;

cout << "enter Kb: ";


cin >> kb;
mb = kb / 1000;

cout << kb << "kb to mb: " << mb << endl;

cout << "do you want any more" << endl;


cout << "1 for continue And press any button for exit" <<
endl;
cin >> question;

//to change mb --> kb


if (enter == 2)
{
float kb;
float mb;

cout << "enter mb: ";


cin >> mb;

kb = mb * 1000;

cout << mb << "mb to kb: " << kb << endl;

cout << "do you want any more" << endl;


cout << "1 for continue and press any button for exit" <<
endl;
cin >> question;

//Currency part
if (number == 4)
{
int iqd = 1;
int usd = 2;
int enter;

cout << "**********************************" << endl;


cout << "Welcome To Currency System" << endl;
cout << "**********************************" << endl;
cout << "1- IQD to USD" << endl;
cout << "2- USD to EURO" << endl;

cout << "Enter Number Of This part you want: ";


cin >> enter;

//to chnage IQD --> USD


if (enter == 1)
{
float IQ;
float US;
cout << "enter IQD: ";
cin >> IQ;

US = IQ / 1230;

cout << IQ << "IQD to USD : " << US << "$" << endl;

cout << "do you want any more" << endl;


cout << "1 for continue and press any button for exit" <<
endl;
cin >> question;

//to change USD --> Euro


if (enter == 2)
{
float E;
float US;

cout << "enter US: ";


cin >> US;
E = US * 0.84;
cout << US << "USD to EURO : " << E << "€" << endl;

cout << "do you want any more" << endl;


cout << "1 for continue and press any botton for exit" <<
endl;
cin >> question;

}
}
}
while (question == 1);
{
cout << "Have a nice day Bye Bye" << endl;
}

system("pause");
return 0;
}

You might also like