Sunday, October 30, 2011
fahrenheit to celsius c++ snippet
// my temp app foo.cpp -- input and output //fahrenheit to celsius /////////////// #include
using namespace std; int main() { int nfleas; // int tx5 = 5; // int div9 = 9; cout << "enter fahrenheit tempature, How hot is it outside?\n"; cin >> nfleas; // C++ input /************************** ***** notes *********** ********************/ // //°C to °F Multiply by 9, then divide by 5, then add 32 // // °F to °C Deduct 32, then multiply by 5, then divide by 9 //tips from //@http://www.cplusplus.com/forum/general/29033/ /************************** ***** notes *********** ********************/ // next line concatenates output cout << "it's now " << (nfleas -32) * (5.0/9.0) << " celsius! bye.\n"; return 0; }
it took my slow ass all day to learn this crap.
No comments:
Post a Comment
Newer Post
Older Post
Home
No comments:
Post a Comment