c语言,warning: return type of 'main' is not `int'怎么解决?
////警告可以忽略,但如果严格点的话
#include<stdio.h>
#include<math.h>
int
main(
int
argc,
char
*arg[])
///标准C主函数原型
{
float
x,y;
printf
(
"Enter x:"
);
scanf
(
"%f"
,&x);
if
(x<0){
y=
pow
(x,5)+2*x+1/x;
}
else
{
y=
sqrt
(x);
}
printf
(
"f(%.2f)=%.2f\n"
,x,y);
return
0;
}