Sunday, October 30, 2011
test my c2f c++ sloppy code
// no cpp use $ c++ input.file and -o output // wardcraft.blogspot.com // bacon bacon bacon // convert celsius to fahrenheit //////////////////////// #include
using namespace std; int main() { int readc; // int foo; // foo = 32; cout << "enter celsius tempature, How cold is it outside?\n"; cin >> readc; // C++ input //°C to °F Farenheit = (9/5)* celsius + 32 //°C to °F Multiply by 9, then divide by 5, then add 32 // next line concatenates output cout << "it's now " << readc *9/5+32 << " fahrenheit! bye.\n"; return 0; }
No comments:
Post a Comment
Newer Post
Older Post
Home
No comments:
Post a Comment