#include <iostream>
#include <cmath>
#include <string>
using namespace std;
int main()
{
double celsius;
double fahrenheit;
char m ;
char n;
//program introduction. Asks for confirmation to continue
cout << "WELCOME TO THE ULTRACONVERTOR 3000, YOUR SOURCE FOR TEMPERATURE CONVERSION," << endl;
cout << "FUFILLING ALL YOUR TEMPERATRUE NEED SINCE 1955" << endl;
cout << "\nWOULD YOU LIKE ME TO CONVERT TEMPERATURES TODAY?" << endl;
cout << "TYPE YES OR NO TO CONTINUE" << endl; 
cin >> m; 
//decides whether they typed yes or no by simply checking the first letter 
switch( m ) {
           case 'y':
           case 'Y':
                 cout << "\n\n\ngreat, let's get started!" << endl;
//if yes, the temp. program begins asking user for which task to proceed with              
cout << "\n\nPlease select which type of conversion you would like to proceed with:" << endl; 
cout << "a)Celsius to Fahrenheit \nb)Fahrenheit to Celsius \nc)I'm done" << endl;      
cin >> n;
switch (n)
          //first case executes the celsius to fahrenheit conversion module
 
 
//while loop that will repeat the program until I select option c          
do
{
          case 'a':
          case 'A':
                 cout << "Let's get started!" << endl;
                 cout << "Please enter a celsius value." << endl;
                 cin >> celsius;
                 
                 fahrenheit = ((9.0/5)*celsius) + 32;
                 
                 cout << "the value you entered was " << celsius << endl;
                 cout << "that equals "<< fahrenheit << " degrees fahrenheit" << endl; 
                 break; 
                 
          //second case executes the fahrenheit to celsius conversion module
          case 'b':
          case 'B':
                 cout << "Let's get started!" << endl;
                 cout << "Please enter a fahrenheit value." << endl;
                 cin >> fahrenheit;
                 
                 celsius = (5.0/9)*(fahrenheit - 32);
                 
                 cout << "the value you entered was" << fahrenheit << endl;
                 cout << "that equals "<< fahrenheit << "celsius" << endl;
                 
                 
                 cout << "thank you for using the ULTRACONVERTOR 3000" << endl;
}
while ( n!= c)
                          
               
               cout << "thank you for using the ULTRACONVERTOR 3000" << endl;
                   
                   
//if not, the program identifies their answer as a no and the program ends                
                 break;              
            case 'n':
            case 'N':
                 cout << " too bad." << endl;
                 break;
            default:
                 cout << "too bad" << endl;
                 break;
}
//fin
system ("PAUSE");
}