Horje
temperature conversion in c++ Code Example
temperature conversion in c++
#TemperatureConversions.py

def main():
	units = input("Which temperature you are using? (F for Fahrenheit, C for Celsius): ")
	temp = eval(input("Please enter the temperature: "))
	if (units == 'F'):
		celcius = 5*(temp - 32)/9
		print("The temperature is", celcius, "Celcius.")
	else:
		fahrenheit = 9*temp / 5+32
		print("The temperature is", fahrenheit, "Fahrenheig")
main()




Cpp

Related
how to use a non const function from a const function Code Example how to use a non const function from a const function Code Example
return use in c++ Code Example return use in c++ Code Example
generating unique id for an object in c++ Code Example generating unique id for an object in c++ Code Example
how to initialize 2d array with values c++ Code Example how to initialize 2d array with values c++ Code Example
char to string c++ Code Example char to string c++ Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
10