当前位置:网站首页>[learn C and fly] 1day Chapter 2 (exercise 2.2 find the temperature of Fahrenheit corresponding to 100 ° f)
[learn C and fly] 1day Chapter 2 (exercise 2.2 find the temperature of Fahrenheit corresponding to 100 ° f)
2022-07-02 02:16:00 【Try to be beautiful】
practice 2.2 Find the Fahrenheit temperature 100°F The corresponding Celsius temperature
Given a Fahrenheit temperature F, This question requires the preparation of procedures , Calculate the corresponding Celsius temperature C.
Calculation formula :C=5×(F−32)/9.
Ensure that both input and output are within the integer range .
demo
#include<stdio.h>
int main(void){
int fahr,celsius;
scanf("%d",&fahr);
celsius = 5*(fahr-32)/9;
printf("Celsius = %d\n",celsius);
return 0;
}
Input
150
Output

边栏推荐
- WebGPU(一):基本概念
- leetcode2310. The one digit number is the sum of integers of K (medium, weekly)
- Construction and maintenance of business websites [12]
- Additional: information desensitization;
- Logging only errors to the console Set system property ‘log4j2. debug‘ to sh
- 剑指 Offer 62. 圆圈中最后剩下的数字
- 【读书笔记】程序员修炼手册—实战式学习最有效(项目驱动)
- * and & symbols in C language
- Exception handling of class C in yyds dry goods inventory
- How to execute an SQL in MySQL
猜你喜欢

1222. Password dropping (interval DP, bracket matching)

Software No.1

JVM面试篇

Data analysis on the disaster of Titanic

479. Additive binary tree (interval DP on the tree)

【毕业季】研究生学长分享怎样让本科更有意义

How to batch add background and transition effects to videos?

How to turn off debug information in rtl8189fs

How to build and use redis environment

Types of exhibition items available in the multimedia interactive exhibition hall
随机推荐
Sword finger offer 31 Stack push in and pop-up sequence
MySQL主从延迟问题怎么解决
leetcode2312. Selling wood blocks (difficult, weekly race)
CSDN article underlined, font color changed, picture centered, 1 second to understand
how to add one row in the dataframe?
Software development life cycle -- waterfall model
Deep learning: a solution to over fitting in deep neural networks
leetcode2305. 公平分发饼干(中等,周赛,状压dp)
Cesium dynamic diffusion point effect
[pit] how to understand "parameter fishing"
Post infiltration flow encryption
How to batch add background and transition effects to videos?
2022 Q2 - Summary of skills to improve skills
[graduation season] graduate seniors share how to make undergraduate more meaningful
C language 3-7 daffodils (enhanced version)
医药管理系统(大一下C语言课设)
How does MySQL solve the problem of not releasing space after deleting a large amount of data
What is the MySQL column to row function
If you want to rewind the video picture, what simple methods can you use?
leetcode2309. The best English letters with both upper and lower case (simple, weekly)