int ConvertedTemp(int f,int c)
{
// ConvertedTemp() is used to convert temperatures from
// Fahrenheit to Celsius or from Celsius to Fahrenheit
// depending on whether the user entered an F or a C.
// C = (9 * tempIn / 5) + 32
// F = 5 * (tempIn - 32) / 9;
int fa,ce;
int tempIn;
char s,t;
char letter;
if (letter == 't')
ce = (9 * tempIn / 5) + 32;
else if(letter == 's')
fa = 5 * (tempIn - 32) / 9;
else if (letter == 'q')
cout<<"Quiting"<<endl;
}
i wrote this program up but now i need to change it,change so that the menu is displayed isstead of being printed by the main()function.it should be named displayMenu().
Um, that's pretty simple if I understand you correctly...
Take a look at this example:
1 2 3 4 5 6 7 8 9 10
void Show_Menu()
{
//Display Menu Here
//Direct it to another function
PlayGame();
}
Simple,right? Just put your menu in a function, and call it in your main.
Also, just a friendly-reminder, please use code tags when you post, it makes everything nicer.