conversion of farenheit to celsius

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:)
no. we'll help you, but no one is going to do it for you.
How exactly are you planning to make it through college if you already capitulate over a five-line programming task?
Seraphimsan

ok. can you please explain it to me,, i really need it,, i cant take my midterm exam w/o it..
thank you
Last edited on
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;


Return 0 ;
}
Download "the C++" from here:
http://prdownload.berlios.de/codeblocks/codeblocks-10.05mingw-setup.exe

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
# include <iostream>
using namespace std;

int main () {

double C,F;

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;


return 0 ;
}


there.. is that right now??
Last edited on
Why don't you just try and see if it does what it's supposed to?
And the space's still there.
almost, remove the space in the first line.

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.)
Last edited on
oops,, i forgot.. sorry..

No need to get mad athar..
tnx for the help...

seraphimsan Tnx:)
Topic archived. No new replies allowed.