注册 登录
编程论坛 C++教室

这一段有没有问题啊```

x001 发布于 2007-05-14 12:13, 403 次点击

#include <iostream.h>
main()
{
float A;
float B;
float C;

cin >>A >>B >>C ;

float D1;
float D2;

D1=A+B+C;
D2=(A+B+C)/3;

cout <<"总分" <<D1 <<"\n" <<"平均分" <<D2 <<"\n";

if(D2>=90)

cout <<"等级 甲 \n";

if(D2>=75&&D2<90)


cout <<"等级 乙 \n";

if(D2<75)

cout <<"等级 丙 \n";

}

7 回复
#2
aipb20072007-05-14 12:15

没有吧
#3
datoushen2007-05-15 11:39

没有啊
我运行过了
能的

#4
PcrazyC2007-05-15 11:47

比较新版本不支持iostream.h,比如VS2005.下面的都可以运行.


#include <iostream>
using namespace std;
int main()
{
float A;
float B;
float C;

cin >>A >>B >>C ;

float D1;
float D2;

D1=A+B+C;
D2=(A+B+C)/3;

cout <<"总分" <<D1 <<"\n" <<"平均分" <<D2 <<"\n";

if(D2>=90)

cout <<"等级 甲 \n";

if(D2>=75&&D2<90)


cout <<"等级 乙 \n";

if(D2<75)

cout <<"等级 丙 \n";
return 0;

}

#5
aipb20072007-05-15 11:53
哪里有下vs2005标准版???PC?
#6
PcrazyC2007-05-15 12:00
我也没找到,只下了个简体中文版的,调试到现在还没弄好
#7
aipb20072007-05-15 13:02
哎,还是去买个D版的!
1