Here’s a Python program to convert Celsius to Fahrenheit:
celsius = float(input("Enter temperature in Celsius: "))
fahrenheit = (celsius * 1.8) + 32
print("Temperature in Fahrenheit: ", fahrenheit)
Example 1 Output:
Enter temperature in Celsius: 25
Temperature in Fahrenheit: 77.0
Example 2 Output:
Enter temperature in Celsius: 0
Temperature in Fahrenheit: 32.0
Example 3 Output:
Enter temperature in Celsius: -10
Temperature in Fahrenheit: 14.0
This program takes user input in Celsius and converts it to Fahrenheit using the formula (Celsius * 1.8) + 32.