helo can anyone help me?? please..
im a 1st year college student...
i dont really get it...
need a C++ program that reads a Fahrenheit degree in double, then
converts it to Celsius. the formula for the conversion is as follows:
Celsius = (5/9) * (Fahrenheit -32)
can some1,, do this for me?? please..
i'll use it as my base..
tnx:)
start by giving us your first try at the program, if you can't get it working, we will try to fill in the blanks for you, but we won't actually do your work for you, as it is a college assignment.
well i cant try it if it works yet,, coz i havent installed the C++ yet.. the installer is on my classmte.. ill have it by monday,,
would you check it for me?
is this correct???? please dont laugh at me..
# include <iostream.h>
int main () {
double C,F;
cout<< " Enter the fahrenheit degree in Double "<<endl;
cin>>F;
C= (5/9)*(F-32);
cout<<" the celsius degrees equivalent to given fahrenheit is " << C <<endl;
About your code:
1. no space between # and include
2. iostream, not iostream.h
3. return, not Return
4. missing using namespace std; after the include
5. division of two integers results in an integer, so you should write 5.0/9
cout<< " Enter the fahrenheit degree in Double "<<endl;
cin>>F;
C= (5.0/9)*(F-32);
cout<<" the celsius degrees equivalent to given fahrenheit is " << C <<endl;
Edit: we are generally compassionate people here and we're always willing to help those willing to learn. Remember that and you'll do fine on these forums :) (and in school.)