

#include<stdio.h>
int main()
{int i,j,result;
for(i=1;i<=9;i++)
{printf("\n");
for(j=1;j<=i;j++)
{result=i*j;
printf("%d*%d=%2d\t",j,i,result);
}
}
getch();
return 0;
}
为什么我用这个代码运行的时候出现了
error C2065: 'getch' : undeclared identifier
错误啊?
getch()没定义?该怎么定义啊?
#include<stdio.h>
int main()
{int i,j,result;
for(i=1;i<=9;i++)
{printf("\n");
for(j=1;j<=i;j++)
{result=i*j;
printf("%d*%d=%2d\t",j,i,result);
}
}
getch();
return 0;
}
为什么我用这个代码运行的时候出现了
error C2065: 'getch' : undeclared identifier
错误啊?
getch()没定义?该怎么定义啊?
加上#include<conio.h>