fork download
  1. //OrinTill Qimid CS1A Chapter 3, P. 147, #21
  2. //
  3. /**************************************************************
  4.  * Convert Celsius to Fahrenheit
  5.  *
  6.  * ____________________________________________________________
  7.  * This program takes any given number in Celsius and Convert it to Fahrenheit.
  8.  * ____________________________________________________________
  9.  * INPUT
  10.  * C : Degree in Celsisus.
  11.  *
  12.  * OUTPUT
  13.  * F : Degree in Fahrenheit.
  14.  **************************************************************/
  15. #include <iostream>
  16. #include <iomanip>
  17. #include <cmath>
  18. using namespace std;
  19.  
  20. int main()
  21. {
  22. float C,
  23. F;
  24. cout<<"Please enter the degree in Celsius "<<endl;
  25. cin>> C;
  26. F = (1.8*C)+32;
  27. cout<< C<<" is "<< F<< " Fahrenheit"<< endl;
  28.  
  29.  
  30.  
  31. return 0;
  32. }
Success #stdin #stdout 0.01s 5284KB
stdin
Standard input is empty
stdout
Standard output is empty