标题:温度测试程序有问题请教!
取消只看楼主
含笑半步颠
Rank: 1
等 级:新手上路
帖 子:12
专家分:0
注 册:2007-2-27
 问题点数:0 回复次数:1 
温度测试程序有问题请教!

// temperature conversion application
#include <iostream.h>
void main()
{
// input temperature, numeric input
int tempinput;
// output temperature, numeric output
int tempoutput;
// input conversion type, single character
// "C" will be used to represent C to F.
// "F" will be used to represent F to C.
char conversiontype;
// input the temperature
cin >> tempinput;
// input conversion type
cin >> conversion type;
// conditionals below
if (conversiontype == 67)
// calculation code here for C to F
tempoutput = (1.8 * tempinput) + 32;
if (conversiontype == 70)
// calculation code here for F to C
tempoutput = (tempinput - 32) * 0.555;
cout << tempout << endl;
}

vc++ 6.0上输出有错
1 error(s), 0 warning(s)
但是我检查了多次不知道错在哪!?
请多指教

[此贴子已经被作者于2007-3-7 22:25:22编辑过]

搜索更多相关主题的帖子: temperature input 温度 conversion 
2007-03-05 21:15
含笑半步颠
Rank: 1
等 级:新手上路
帖 子:12
专家分:0
注 册:2007-2-27
得分:0 
哦~ 谢谢!
2007-03-07 22:23



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-122657-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 2.871943 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved