博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
摄氏温度转换为华氏温度超时_C程序将温度从华氏温度转换为摄氏温度或将摄氏温度转换为华氏温度...
阅读量:2507 次
发布时间:2019-05-11

本文共 1139 字,大约阅读时间需要 3 分钟。

摄氏温度转换为华氏温度超时

#include<stdio.h> #include<conio.h>

#include <stdio.h> #include <conio.h>

void main() { double temp,ctemp; int ch; clrscr();    //to clear the screen

void main(){double temp,ctemp; 诠释 clrscr(); //以清除屏幕

    printf(“Temprature Converrsion Menu”); printf(“nt1.Fahrenheit to Celsius”); printf(“nt2.Celsius to Fahrenheit”); printf(“nEnter your choice(1/2):”); scanf(“%d”,&ch);

printf(“温度转换菜单”); printf(“ nt1。摄氏度到华氏度”); printf(“ nt2。摄氏度到华氏度”); printf(“ n输入您的选择(1/2):”); scanf(“%d”,&ch);

if(ch==1) { printf(“Enter Temperature in Fahrenheit:”); scanf(“%lf”,&temp); ctemp=(temp-32)/1.8; printf(“nTemprature in celcius is %lf”,ctemp); } else if(ch==2) { printf(“Enter Temperature in Celsius:”); scanf(“%lf”,&temp); ctemp=(1.8*temp)+32; printf(“nTemperature in Fahrenheit is %lf”,ctemp); } else printf(“nWrong choice…..!!”); getch();    //to stop the screen }

if(ch == 1){printf(“以华氏温度输入温度:”); scanf(“%lf”,&temp); ctemp =(temp-32)/1.8; printf(“摄氏温度为%lf”,ctemp); } else if(ch == 2){printf(“以摄氏度输入温度:”); scanf(“%lf”,&temp); ctemp =(1.8 * temp)+32; printf(“华氏温度为%lf”,ctemp); } else printf(“ nWrong choice….. !!”); getch(); //停止屏幕}

翻译自:

摄氏温度转换为华氏温度超时

转载地址:http://orwwd.baihongyu.com/

你可能感兴趣的文章
多线程基础
查看>>
完美解决 error C2220: warning treated as error - no ‘object’ file generated
查看>>
使用SQL*PLUS,构建完美excel或html输出
查看>>
前后台验证字符串长度
查看>>
《算法导论 - 思考题》7-1 Hoare划分的正确性
查看>>
win64 Python下安装PIL出错解决2.7版本 (3.6版本可以使用)
查看>>
获取各种类型的节点
查看>>
表达式求值-201308081712.txt
查看>>
centos中安装tomcat6
查看>>
从Vue.js窥探前端行业
查看>>
学习进度
查看>>
poj3368 RMQ
查看>>
“此人不存在”
查看>>
github.com加速节点
查看>>
解密zend-PHP凤凰源码程序
查看>>
python3 序列分片记录
查看>>
Atitit.git的存储结构and 追踪
查看>>
atitit 读书与获取知识资料的attilax的总结.docx
查看>>
B站 React教程笔记day2(3)React-Redux
查看>>
找了一个api管理工具
查看>>