Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

C++ celsius to fahrenheit

 	float cel, far;
    
    cout << "Enter the temperature in Celsius: ";
    cin >> cel;

    far = (cel * 1.8) + 32;      //(°C * 1.8) + 32 = °F

    cout << "The temperature of " << cel << " in Fahrenheit is: " << far;
 
PREVIOUS NEXT
Tagged: #celsius #fahrenheit
ADD COMMENT
Topic
Name
1+1 =