高手请进 求助:call to function 'printf' with no prototype in function main???

一段很简单的程序,但不知为什么,就是出错??
main()
{int a,b,c,d,sum;
a=10;b=20;c=30;
sum=a+b*c;
a=c;d=a+c;
printf("sum=%d,d=%d",sum,d);
}

Waring:Call to function 'printf' with no prototype in function main
检查多次,输入法是在英文下.请教高手,先谢谢了!
感谢高手的指点,但我在程序前加了#include<stdio.h>后,Waring:Unable to open include file 'STDIO.H',真是奇怪,系统应默认printf,scanf函数可不加#include命令,而且我加了#include<stdio.h>后也打不开”STDIO.H”,操作系统应自带库函数吧,这么会打不开标准输入输出库函数,难道xp系统没有带!而且我的TURBOC是安装在C盘下的.
输出改为printf("%d,%d",sum,d);后,还是Waring:Call to function 'prinrf' with no prototype in function main.

急呀!!哪位高手再指点一下,小弟先谢了.

第1个回答  2007-04-02
在最前面加上个 #include <stdio.h> 看看
第2个回答  2007-04-02
printf("%d,%d",sum,d);
第3个回答  2007-04-02
是不是因为前面没有#include呢?
相似回答