下面这段程序的mul=int1*int2有错误,怎么改?

[复制链接]
查看11 | 回复1 | 2008-7-23 02:07:45 | 显示全部楼层 |阅读模式
#include
#include
#include
int int1,int2;
main()
{
cout>int1;
cout>int2;
mul=int1*int2;
cout #include #include int int1,int2,mul; main() { haha:int1=0;int2=0;mul=0;//程序初始化,要不再回来时变量就有初始值,要习惯变量初始化cout>int1; cout<<"Please enter second integer number:\n";
回复

使用道具 举报

千问 | 2008-7-23 02:07:45 | 显示全部楼层
mul=int1*int2; 改成 int mul=int1*int2; 还有更重要的一点return 0; 改成 return;你的main函数应该返回值应该是void 怎么还返回0呢 对吧
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行