我想知道我这段简单的程序哪错了,怎样看下面的错误解释?

来源:百度知道 编辑:UC知道 时间:2024/04/26 01:19:52
#include <math.h>
main()
{
float a,b,c,s,area;
scanf("%f,%f,%f",&a,&b,&c);
s=1.0/2*(a+b+c);
area=sqrt(s*(s-a)*(s-b)*(s-c));
printf("a=%7.2f,b=%7.2f,c=%7.2f,s=%7.2f\n",a,b,c,s);
printf("area=%7.2f\n",area);
}

错误解释
--------------------Configuration: 222 - Win32 Debug--------------------
Compiling...
222.cpp
E:\ccc\222.cpp(5) : error C2065: 'scanf' : undeclared identifier
E:\ccc\222.cpp(6) : warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
E:\ccc\222.cpp(7) : warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
E:\ccc\222.cpp(8) : error C2065: 'printf' : undeclared identifier
E:\ccc\222.cpp(10) : warning C4508: 'main' : function should return a value; 'void' return type assume

error C2065: 'scanf' : undeclared identifier
不能识别,原因是找不到scanf函数,没有头文件造成的了..

再加一句#include <studio.h>

对阿,没调用输入输出函数库

怎么没有结尾呢