Code:

#include <iostream>
#include <stdlib.h>
//function prototypes
float celsius_(float faren);
float farenhiet_(float cels);
void show_menu();
int main(int argc, char *argv[])
{
//declared variables
float celsius_, farenhiet_, result, result1;
celsius_ = 0.0;
farenhiet_ = 0.0;
//declared variables
int answer_, pass_;
answer_ = 0;
pass_ = 0;
cout << "This program converts celsius to farenhiet and vice versa. " << endl;
cout << "Would you like to continue? 0 for No, 1 for Yes."<<endl;
cin>>pass_;
while (pass_ > 0)//beginning of while loop
{ //with if statements inside
show_menu(); //first function called
cin>>answer_;
if (answer_ == 1)
{
cout << "Enter the degree celsius that you want to convert to farenhiet: "<<endl;
cin>>celsius_;
result = farenhiet_( float cels );
cout << "The answer is: " << result << endl;
}
else if (answer_ == 2)
{
cout << "Enter the degree farenhiet that you want to convert to celsius: "<<endl;
cin>>farenhiet_;
result1 = celsius_( float faren );
cout << "The result is: " << result1 << endl;
}
}
system("PAUSE");
return 0;
}
//funtion #1
float farenhiet_(float cels)
{
float result;
result = (1.8 * cels) + 32;
return result;
}
//funtion #2
float celsius_(float faren)
{
float result;
result = .55 * (faren - 32);
return result;
}
//Function #3
void show_menu()
{
cout << "Enter a number."<<endl;
cout << "1. Celsius to Farenhiet."<<endl;
cout << "2. Farenhiet to Celsius."<<endl;
}