fork download
  1. //Andrew Alspaugh CS1A Chapter 3. P. 144. #10
  2. //
  3. /*****************************************************************************
  4.  *
  5.  * Covert Celcius to Farenheit
  6.  * __________________________________________________________________________
  7.  * This program converts Celcius to Farenheit
  8.  * __________________________________________________________________________
  9.  * INPUT:
  10.  * C :Input Celcius in Degrees
  11.  *
  12.  * OUTPUT:
  13.  * F :Output Farenheit in Degrees
  14.  ****************************************************************************/
  15. #include <iostream>
  16. using namespace std;
  17. int main()
  18. {
  19.  
  20. float C; //Input - Celcius in Degrees
  21. float F; //Output - Farenheit in Degrees
  22.  
  23. cout<<"enter celcius"<<endl;
  24. cin>>C;
  25.  
  26. F=(9 / 5) * C + 32;
  27.  
  28. cout<<"farenheit is "<< F;
  29. return 0;
  30. }
Success #stdin #stdout 0s 5320KB
stdin
34
stdout
enter celcius
farenheit is 66