Guest User

Untitled

a guest
May 25th, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.17 KB | None | 0 0
  1. #include <cstdio>
  2. #include <cstdlib>
  3. #include <iostream>
  4. using namespace std;
  5.  
  6. int main(int nNumberofArgs, char* pszArgs[])
  7. {
  8. cout << "This program will convert any Celsius number to farenheit.";
  9. cout << "\nI will modify this program shortly with a koolinterface.";
  10. cout << "\nit will also be attached to a calculator.";
  11. cout << "\nthis cancultor will consist of all the functions";
  12. cout << "\nyou will ever need to perform any tasks from";
  13. cout << "\nany field of studies.";
  14.  
  15. // enter the temperature in Celsius
  16. int celsius;
  17. cout << "\n\nEnter the temperature in Celsius:";
  18. cin >> celsius;
  19.  
  20. // calculate conversion factor of celsius
  21. // to fahrenheit
  22. int factor;
  23. factor = 212-32;
  24.  
  25. // using conversion factor to convert celsius
  26. // into farenheit values
  27. int farenheit;
  28. farenheit=factor*celsius/100+32;
  29.  
  30. // output the results (followed by a NewLine)
  31. cout << "Fahrenheit value is:";
  32. cout << farenheit << endl;
  33.  
  34. // wait until user is ready before terminating program
  35. // to allow the user to see the program results
  36. system("PAUSE");
  37. return 0;
  38. }
Add Comment
Please, Sign In to add comment