c 语言 编程序题

来源:百度知道 编辑:UC知道 时间:2024/06/02 05:40:05
编写函数“判断整数x的绝对值是否大于5,如果大于5,则输出True,否则输出false。(程序以文件名A6B1.c存盘)。
不能运行- -

#include math.h
#include stdio.h
void main()
int x;
{if(fabs(x)<5)
printf("trus");
else printf("false");
}

void fun(int x)
{ if(x>5||x<-5) printf("True");
else printf("False");
getchar();
}

领分咯

加个头文件!试下!