help

Write your question here.

I have to Create the following program which converts Fahrenheit to Celsius. Your program must have the following functions:
•Read integer Fahrenheit temperatures from the user. You need to check whether the input is the correct one or not. If the user enters the incorrect number, ask it again.
•Use the formula: Celsius = (Fahrenheit – 32) * 5.0 / 9.0
•The output Celsius should be a floating point with two digits of precision.
•The Celsius temperatures should be displayed with a sign of positive or negative.
•The program should ask the user to continue or not. If the user wants to do the conversion again, use repetitive statements such as DO WHILE, FOR, or IF THEN ELSE to do the conversion again
this is what I have so far
Using std:: cout;
usinf std:: endl;
using std:: internal; // uses internal spacing
usnig std:: showpos; //shows positive sign on positive integers
#include <string>
#include <iomanip>
using std:: setw:
Using namespace std;

int main ()
{
cout << "Dot Ash \n";
cout << "Temperature Conversion \n";
cout <<"INF. 231 Programing Concepts \n";

char repeat = 'Y';
while (repeat =='Y'|| repeat == 'Y');

if (cin.fail) || (input > 250) || (input < -150);


cout<<"invalid entry, please try again:";
cin.clear();
cin.ignore();

while cin.faill)();|| (input > 250);|| (input < -150);34



double input;
cout <<("Enter Fahrenheit");
cin>> input
cout "\n";

double celsius;
celsius = (-32) *5.0/9.0;
cout << fixed;
cout <<setprecision (2);
cout <<"\n";
cout<<internal<<showpos<<setw (5))<<input<<"Fahrenheit Degrees ="<<celsius<<"Celsius Degrees \n"<<endl<<endl;
cout<<"Do you have more numbers to convert?"<<endl;
cout << "enter 'Y' to continue." << endl;
cin>>repeat;
cout<<endl;

system ("pause");
return 0;

}
what is keeping it from running successfully?


Last edited on
For one, it'd be better from a visual point of view if you were to use code tags, as denoted by the <> button somewhere on the righthand side of the textbox.

Also you have misspellings and capitalizations where they shouldn't be. C++ is case sensitive. In other words, int is a keyword in C++ and several other languages specifying a certain type of variable.

However, Int is just a name.

And you might want to check your closing semicolons.
Topic archived. No new replies allowed.