[求助]我这个C++程序为什么运行不了?
c++吧
全部回复
仅看楼主
level 1
飞剑侠 楼主
#include
using namespace std;main(){int i=1,j=1,xc;for(i=1;i<=9;i++){for(j=1;j<=i;j++){xc=i*j;cout<<" "<
2007年10月16日 02点10分 1
level 9
第一行改为 void main()
2007年10月16日 08点10分 2
level 1
你想要什么结果?没有语法错误啊
2007年10月17日 06点10分 3
level 5
没错啊!!
2007年10月19日 13点10分 4
level 1
#include
using namespace std; int main() { int i=1,j=1,xc; for(i=1;i<=9;i++) { for(j=1;j<=i;j++) { xc=i*j; cout<<" "<
2007年10月19日 13点10分 5
level 5
#include
using namespace std; main() { int i=1,j=1,xc; for(i=1;i<=9;i++) { for(j=1;j<=i;j++) { xc=i*j; cout<<" "<
2007年10月19日 13点10分 6
level 0
你这么写就算能输出出来也是错的 for语句里的头 也就是你那个变量 一但出了for语句的括号就没有了 也就是说你下边的 i*j变量其实还是1*1而已 你不防用while语句写
2007年10月19日 16点10分 7
level 1
楼上的朋友,这个题目要的就是1*1这种效果,想想,这个是乘法表,第一行就是1*1啊.
2007年10月21日 07点10分 8
level 0
int mainreturn 0;用新的编译器要用C++标准
2007年10月21日 13点10分 9
level 0
开头用 void main()
2007年10月22日 02点10分 10
level 1
没错
2007年10月22日 12点10分 11
level 0
int main()return 0;
2007年10月22日 14点10分 12
level 1
没错的啊 你用VC++6.0去运行一下就可以了我运行了 是可以的 没错的
2007年10月23日 08点10分 13
level 0
检查一下,工具-选项-目录设置的对不对啊
2007年10月23日 12点10分 14
level 1
int i=1,j=1,xc; //已经定义变量i,j 而且初始化for(i=1;i<=9;i++) //这里再写i = 1 ;不会报错说重复定义??{ for(j=1;j<=i;j++) //这里再写j = 1 ;不会报错说重复定义??
2007年10月24日 08点10分 15
level 1
回楼上的,那是赋值语句,不是定义语句,所以不会存在所谓的重复定义如果写成for(int i=1;i<=9;i++){......}这样的话就会说重复定义了.
2007年10月25日 15点10分 16
level 1
顺便说下,不要老拿VC6.0说事,那编译器本身就不符合现在的C++标准了,他通得过的程序不一定就见的没有错误,比如现在最基本的 Main()这个函数,以前是不需要返回值的,所以VC6.0可以在 void main() 这样的情况下编译通过,但是新的标准是不能这样的,要有一个int的返回值,所以上面的几个朋友的观点有点不同,就是因为他们所用的编译器不同导致的,推荐大家用DEVC++
2007年10月25日 15点10分 17
level 1
#include
void main() { cout<<"九九乘法表:"<
2007年10月26日 03点10分 19
1