当前位置:网站首页>[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
边栏推荐
- Construction and maintenance of business websites [14]
- 【liuyubobobo-玩转Leetcode算法面试】【00】课程概述
- Sword finger offer 47 Maximum value of gifts
- The concepts and differences between MySQL stored procedures and stored functions, as well as how to create them, the role of delimiter, the viewing, modification, deletion of stored procedures and fu
- 【带你学c带你飞】1day 第2章 (练习2.2 求华氏温度 100°F 对应的摄氏温度
- Types of exhibition items available in the multimedia interactive exhibition hall
- Decipher the AI black technology behind sports: figure skating action recognition, multi-mode video classification and wonderful clip editing
- As a software testing engineer, will you choose the bank post? Laolao bank test post
- RTL8189FS如何关闭Debug信息
- Construction and maintenance of business websites [15]
猜你喜欢
[graduation season] graduate seniors share how to make undergraduate more meaningful
OpenCASCADE7.6编译
Five skills of adding audio codec to embedded system
479. Additive binary tree (interval DP on the tree)
WebGPU(一):基本概念
Sword finger offer 62 The last remaining number in the circle
RTL8189FS如何关闭Debug信息
Additional: information desensitization;
【带你学c带你飞】3day第2章 用C语言编写程序(练习 2.3 计算分段函数)
From January 11, 2007 to January 11, 2022, I have been in SAP Chengdu Research Institute for 15 years
随机推荐
[opencv] - comprehensive examples of five image filters
MySQL中一条SQL是怎么执行的
The wave of layoffs in big factories continues, but I, who was born in both non undergraduate schools, turned against the wind and entered Alibaba
how to come in an investnent bank team
STM32F103——两路PWM控制电机
Pytest testing framework
剑指 Offer 42. 连续子数组的最大和
Duplicate keys detected: ‘0‘. This may cause an update error. found in
trading
Open那啥的搭建文档
mysql列转行函数指的是什么
1222. Password dropping (interval DP, bracket matching)
Quality means doing it right when no one is looking
How to turn off the LED light of Rog motherboard
OpenCASCADE7.6编译
Architecture evolution from MVC to DDD
leetcode2311. 小于等于 K 的最长二进制子序列(中等,周赛)
【C#】使用正则校验内容
flutter 中間一個元素,最右邊一個元素
What are the necessary things for students to start school? Ranking list of Bluetooth headsets with good sound quality