Hi there, I am in my first programming class, and need a little help...The assignment is to create a program that converts Fahr to Celsius and vice versa using prototypes, a menu and a switch, and the output to be displayed as a table...Here's what I have so far, it was running, when I had case one, then I "broke" it somehow doing case 2...I'm not very proficient at debugging, U keep getting the error that the initialization skipped the 'fahr' and 'celsius' and I'm sure there is plenty more wrong, lol...Any help is appreciated, thank!
#include<iostream>
#include<conio.h>
#include<iomanip>
using namespace std;
///Entry point to the application
int main(void)
{
//display a menu
cout << "Menu" << endl;
cout << "1) Convert Fahrenheit to Celsius" << endl;
cout << "2) Convert Celsius to Fahrenheit" << endl;
cout << "3) Exit" << endl;
//get user's choice
cout << "Enter your choice:" ;
int choice = 0;
cin >> choice;
//cases
switch(choice)
case 1:
{
cout << "Enter temperature in Fahrenheit ";
float fahr = 0.0;
cin >> fahr;
//convert the temp
float celsius = FahrToCel( fahr );
You had forgotten some brackets '{}' and left off the convert to Fahrenheit function. Well, here is the program with corrections. I changed the floats to double, as errors were shown, "Conversion from Double to Float..". Now all you need to do, is finish it with the table display