#include<iostream>
#include <iomanip>
using namespace std;
void convertFtoC(int); // converte function F to C
void convertCtoF(int); // converte function C to F
void print (int);
int main()
{
char choice; // Choice between c for Celsius and f for Fahrenheit
int degree; // the degree the user input
int convertCtoF, convertFtoC; // to convert either Celsius or Fahrenheit
while(choice == 'c' || choice == 'f' || choice == 'C' || choice == 'F')
cout<<"This program converts the degrees from Fahrenheit to Celsius and vice versa."<<endl;
cout<<"\n\nThe following are the options:\n "<<endl;
cout<<"Press C to convert from Celsius to Fahrenheit"<<endl; // choice C
cout<<"Press F to convert from Fahrenheit to Celsius"<<endl; // choice f
cout<<"Press any other key to EXIT the program\n"<<endl; // any key to EXIT
cout<<"Please Enter your choice: "<<endl;
cin>>choice;
{
if(choice == 'c' || choice == 'C' )
{ // for option C
convertCtoF(degree); // call converte function
print (degree); // call print function
void convertCtoF(int& calc){ // function to calculate from C to F
int calc, conv;
cout<<"Enter Fahrenheit degrees for conversion: "<<endl;
cin>>calc;
conv=calc * (9/5) + 32;
}
void convertFtoC(int& calc){ // function to calculate from F to C
int calc, conv;
cout<<"Enter Fahrenheit degrees for conversion: "<<endl;
cin>>calc;
conv=(calc - 32) * 5/9;
}
void print(int cdegree){ // function to print the result