10*30 C语言
来源:百度知道 编辑:UC知道 时间:2024/09/20 12:02:35
#include "stdio.h"
#define ho 30
main()
{ int n, x;
n=10;
x=n*ho;
print ("x= %d",x);
}
错在哪里了啊?初学者
#define ho 30
main()
{ int n, x;
n=10;
x=n*ho;
print ("x= %d",x);
}
错在哪里了啊?初学者
你的printf写错了
#include "stdio.h"
#define ho 30
void main()
{
int n, x;
n=10;
x=n*ho;
printf ("x= %d",x);
}
这样就ok了
#include "stdio.h"
#define ho 30
void main() //增加返回类型void
{ int n, x;
n=10;
x=n*ho;
printf ("x= %d",x); //print改为printf
}
printf ("x= %d",x);