Dcoder logo

Degree Celsius @ Dcoder

By Lochard | As a newbie programmer | 18 Mar 2023


Problem: Tom is a scientist. He uses huge machines for complex calculations. There is a problem, the machines takes input as Fahrenheit and Tom has the temperatures in Degree Celsius. As he is busy with his work, he asks your help to convert Degree Celsius to Fahrenheit.

Input: The first and only line of the input consists of a single integer T denoting temperature in Degree Celsius.

Output: Print an integer denoting temperature in Fahrenheit.

Constraints: 0<=T<=1000

Sample Input: 100

Sample Output: 

212

print(int(input()) * 9 // 5 + 32)

How do you rate this article?

1


Lochard
Lochard

20240228 Arrived in the UK for about 2 week. All my fears persist. Some are even getting worse. https://github.com/locharp/asylum_diary/


As a newbie programmer
As a newbie programmer

Sharing entry level codes. My snippets on GitHub https://github.com/locharp/code-snippets

Send a $0.01 microtip in crypto to the author, and earn yourself as you read!

20% to author / 80% to me.
We pay the tips from our rewards pool.