Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <cstdio>
- #include <cstdlib>
- #include <iostream>
- using namespace std;
- int main(int nNumberofArgs, char* pszArgs[])
- {
- cout << "This program will convert any Celsius number to farenheit.";
- cout << "\nI will modify this program shortly with a koolinterface.";
- cout << "\nit will also be attached to a calculator.";
- cout << "\nthis cancultor will consist of all the functions";
- cout << "\nyou will ever need to perform any tasks from";
- cout << "\nany field of studies.";
- // enter the temperature in Celsius
- int celsius;
- cout << "\n\nEnter the temperature in Celsius:";
- cin >> celsius;
- // calculate conversion factor of celsius
- // to fahrenheit
- int factor;
- factor = 212-32;
- // using conversion factor to convert celsius
- // into farenheit values
- int farenheit;
- farenheit=factor*celsius/100+32;
- // output the results (followed by a NewLine)
- cout << "Fahrenheit value is:";
- cout << farenheit << endl;
- // wait until user is ready before terminating program
- // to allow the user to see the program results
- system("PAUSE");
- return 0;
- }
Add Comment
Please, Sign In to add comment