3-2 計算攝氏溫度
3-2 計算攝氏溫度
給定一個華氏溫度F,本題要求編寫程序,計算對應的攝氏溫度C。計算公式:C=5×(F?32)/9。題目保證輸入與輸出均在整型範圍內。
輸入格式:
輸入在一行中給出一個華氏溫度。
輸出格式:
在一行中按照格式“Celsius = C”輸出對應的攝氏溫度C的整數值。
輸入樣例:
150
輸出樣例:
代碼:
Celsius = 65
#include<stdio.h>
int main()
{
int F,C;
scanf("%d",&F);
C=5*(F-32)/9;
printf("Celsius = %d",C);
return 0;
}
3-2 計算攝氏溫度
相關推薦
3-2 計算攝氏溫度
輸出格式 -h clu hit pan scan str 格式 out 3-2 計算攝氏溫度 給定一個華氏溫度F,本題要求編寫程序,計算對應的攝氏溫度C。計算公式:C=5×(F?32)/9。題目保證輸入與輸出均在整型範圍內。 輸入格式: 輸入在一行中給出一個華氏溫度
L1-004. 計算攝氏溫度
程序 can ret main pan ron urn 數值 turn 給定一個華氏溫度F,本題要求編寫程序,計算對應的攝氏溫度C。計算公式:C = 5*(F-32)/9。題目保證輸入與輸出均在整型範圍內。 輸入格式: 輸入在一行中給出一個華氏溫度。 輸出格式: 在一行中按
計算攝氏溫度(10 分)
給定一個華氏溫度F,本題要求編寫程式,計算對應的攝氏溫度C。計算公式:C=5×(F−32)/9。題目保證輸入與輸出均在整型範圍內。 輸入格式: 輸入在一行中給出一個華氏溫度。 輸出格式: 在一行中按照格式“Celsius = C”輸出對應的攝氏溫度C
計算攝氏溫度 fahr = 100, celsius = 計算所得攝氏溫度的整數值
本題要求編寫程式,計算華氏溫度100°F對應的攝氏溫度。計算公式:C=5×(F−32)/9,式中:C表示攝氏溫度,F表示華氏溫度,輸出資料要求為整型。 輸入格式: 本題目沒有輸入。 輸出格式: 按照下列格式輸出 fahr = 100, celsius = 計算所得攝
練習3-2 計算符號函式的值
練習3-2 計算符號函式的值(10 分) 對於任一整數n,符號函式sign(n)的定義如下: 請編寫程式計算該函式對任一輸入整數的值。 輸入格式: 輸入在一行中給出整數n。 輸出格式: 在一行中按照格式“sign(n) = 函式值”輸出該整數n對應的函式值。
IO-09. 計算攝氏溫度
給定一個華氏溫度F,本題要求編寫程式,計算對應的攝氏溫度C。計算公式:C = 5*(F-32)/9。題目保證輸入與輸出均在整型範圍內。 輸入格式:輸入在一行中給出一個華氏溫度。 輸出格式: 在一行中按照格式“Celsius = C”輸出對應的攝氏溫度C的整數值。 輸入
1023 例題3-2 計算存款利息
題目描述計算存款利息。有1000元,想存一年。有三種存款方法可選:(1)活期,年利率r1=0.0036;(2)一年定期,年利率r2=0.0225;(3)兩次半年定期,年利率r3=0.0198。請分別計算出一年後按這3中方法得到的本息和。三個結果之間以空格分隔,注意最後輸出換行
c語言練習題 3-2 計算矩形面積
矩形面積計算 #include<stdio.h> int max(int a,int b) { if(a>b) { return a; } else { return b; } } int min(int a,int b) {
1、專案2.3-攝氏溫度轉換為華氏溫度
1. 任務描述:輸入攝氏溫度值©,轉換為華氏溫度值(F)並輸出。F=C×9/5+32,溫度值取浮點數型別。 2. 程式碼實現 /* *Copyright(c)2018,CSDN *All rights reserved. *檔名稱:ctof.cpp *作 者:馬婭芳 *完成日
.NET並行計算和並發3.2-多線程調用Invoke
進度 color one void new -418 invoke 調用 操作 以下這個例子是用一個後臺線程執行計算邏輯,這樣不影響前臺界面操作,也就是說 可以在前臺UI界面執行其他操作。 重點是新線程中,調用了一個委托方法,這個方法是需要填充數據到前臺控件,因為 前臺控件
python3 練手實例3 攝氏溫度與華氏溫度轉換
pytho 一個 div orm code input 溫度 實例 format 1 def wd(): 2 w=input(‘請輸入一個攝氏溫度或者一個華氏溫度,如,34c/C or 34f/F:‘) 3 if w[-1] in [‘c‘,‘C‘]
Problem H: 計算數列和2/1,3/2,5/3,8/5......
#include<stdio.h> int main(){ int i,n; scanf("%d",&n); float sum=0.0; float a=1; float b=2; for(i=1;i<=n;i++){
大學計算機——計算思維導論 第3章 問題求解框架 3.2 演算法類問題求解框架 課後作業
1、演算法就是一個有窮規則的集合,其中之規則規定了解決某一特定型別問題的一個運算序列。回答下列問題。 (1)關於演算法的特性,下列說法不正確的是_____。 (A)演算法必須有明確的結束條件,即演算法應該能夠結束,此即演算法的有窮性;√ (B)演算法的步驟必須要確切地定義,不能有歧義性,此即演算法的確定
[SLAM](3-2):使用Eigen表示矩陣、向量及相關計算
結合 高翔老師的著作《視覺SLAM十四講:從理論到實踐》,加上小白的工程經驗共同完成。建議購買紙製書籍搭配使用。 1.Eigen Eigen是一個C++開源線性代數庫。相比於其他庫,Eigen 特殊之處在於,它是一個純用標頭
Win8 Metro(C#)數字影象處理--3.2影象方差計算
/// <summary> /// /// </summary>Variance computing. //
Spark2.3.2原始碼解析: 10. 排程系統 Task任務提交 (二) TaskScheduler : 本地化計算
架構圖: Standalone模式提交執行流程圖: 首先寫一個WordCount程式碼(這個程式碼,為了觀察多個stage操作,我寫了兩個reducebykey 函式) 原始碼:
JavaScript基礎 substr(2, 3) 2是起始的index的值 3是提出來3個字符
subst bstr 博文 htm bst firefox 傳智播客 src 部分 鎮場詩: 清心感悟智慧語,不著世間名與利。學水處下納百川,舍盡貢高我慢意。 學有小成返哺根,願鑄一良心博客。誠心於此寫經驗,願見文者得啟發。——————————————————
ABP官方文檔翻譯 3.2 值對象
-s str 如果 相等 bject 實踐 編號 整體 經典 值對象 介紹 值對象基類 最佳實踐 介紹 "展現領域描述性層面且沒有概念性身份的對象稱之為值對象。"(Eric Evans)。 和實體相反,實體有身份標示(Id),值對象沒有身份標示。
iOS 制作自動打包腳本 Xcode8.3.2
pri deb round odin 環境 user targe 網上 public 本文包含以下內容: 前言 1.shell腳本的編寫 2.xcodebuild命令 3.完整的可用示例 參考資料 前言
MongoDB-JAVA-Driver 3.2版本常用代碼全整理(1) - 增刪改
tails posit 第一個 2.x 做了 alt private 依賴 while 轉載,原文連接: http://blog.csdn.net/autfish/article/details/51356537 MongoDB的3.x版本Java驅動相對2.x做了全新的設