...to celsius. What is the formula for conversion from F to C and C to F? Thanks all !
...to celsius. What is the formula for conversion from F to C and C to F? Thanks all !
Do not make direct eye contact with me.
This is what I've always wondered and haven't been able to find a good answer.
The Celsius scale is based off of the freezing and boiling point of water. What the hell is Fahrenheit based off of?
http://www.gi.alaska.edu/ScienceForum/ASF13/1317.htmlOriginally posted by Thantos
This is what I've always wondered and haven't been able to find a good answer.
The Celsius scale is based off of the freezing and boiling point of water. What the hell is Fahrenheit based off of?
It's a wonder what a little googling can accomplish.
FAQ
"The computer programmer is a creator of universes for which he alone is responsible. Universes of virtually unlimited complexity can be created in the form of computer programs." -- Joseph Weizenbaum.
"If you cannot grok the overall structure of a program while taking a shower, you are not ready to code it." -- Richard Pattis.
OK, I must be missing somethign real simple here, but what the hell is wrong here:
Thanks all .Code:#include <iostream> using namespace std; int main() { int h = 105, l = 95; cout << h << " " << l << endl; h = (5 / 9) * (h - 32); l = (5 / 9) * (l - 32); cout << h << " " << l; h = (9 / 5) * (h + 32); l = (9 / 5) * (l + 32); cout << h << " " << l; return 0; }
Last edited by Lurker; 09-13-2003 at 11:55 PM.
Do not make direct eye contact with me.
Ah ha! They should be float's huh! I think I solved it...
EDIT: So heres what I got, but it isnt accurate enough. How could I make it more accurate? Thanks all!
EDIT 2:Code:#include <iostream> using namespace std; int main() { int h = 105, l = 95; cout << h << " " << l << endl; h = (5.0f / 9.0f) * (h - 32); l = (5.0f / 9.0f) * (l - 32); cout << h << " " << l << endl; h = (9.0f / 5.0f) * h + 32; l = (9.0f / 5.0f) * l + 32; cout << h << " " << l; return 0; }
Alright, what you want a float, you put an f after teh integer, what do you put for doubles? This is more accurate, but i dont want a variable for 5 and 9, and this still isnt accurate enough! Thanks all!
Code:#include <iostream> using namespace std; int main() { int h = 105, l = 95; double d = 5, d2 = 9; cout << h << " " << l << endl; h = (d / d2) * (h - 32); l = (d / d2) * (l - 32); cout << h << " " << l << endl; h = (d2 / d) * h + 32; l = (d2 / d) * l + 32; cout << h << " " << l; return 0; }
Last edited by Lurker; 09-14-2003 at 12:01 AM.
Do not make direct eye contact with me.
It's got something to do with cooking Spaghetti-o's, IIRC.Originally posted by Thantos
What the hell is Fahrenheit based off of?
-Govtcheez
[email protected]
It was designed so that the average human body temperature would be 100.0... someone just screwed up a bit in the lab.Originally posted by Thantos
What the hell is Fahrenheit based off of?
The word rap as it applies to music is the result of a peculiar phonological rule which has stripped the word of its initial voiceless velar stop.
There's your problem. You're still saving those temperature calculations into integers, thus losing a good deal of accuracy. Just make 'em doubles.Originally posted by Lurker
EDIT: So heres what I got, but it isnt accurate enough. How could I make it more accurate? Thanks all!
Code:int h = 105, l = 95;
FAQ
"The computer programmer is a creator of universes for which he alone is responsible. Universes of virtually unlimited complexity can be created in the form of computer programs." -- Joseph Weizenbaum.
"If you cannot grok the overall structure of a program while taking a shower, you are not ready to code it." -- Richard Pattis.
Duhduhduh....thanks man, thats what I needed .
Do not make direct eye contact with me.
Its based off of the fact that it is the "proper" temperature scale. Well, if you are old(ish).Originally posted by Thantos
This is what I've always wondered and haven't been able to find a good answer.
The Celsius scale is based off of the freezing and boiling point of water. What the hell is Fahrenheit based off of?
Such is life.
>>Alright, what you want a float, you put an f after teh integer, what do you put for doubles?
You put nothing after a number for it to be a double.
Naturally I didn't feel inspired enough to read all the links for you, since I already slaved away for long hours under a blistering sun pressing the search button after typing four whole words! - Quzah
You. Fetch me my copy of the Wall Street Journal. You two, fight to the death - Stewie