魔兽作弊码快速移动:求任一实数的绝对值?用C语言编写?谢谢

来源:百度文库 编辑:查人人中国名人网 时间:2024/05/11 01:24:30

#include <stdio.h>
#include <math.h>

void main(){
float f;
scanf("%f",&f);
printf("|%f|=%f",f,fabs(f));
}

main()
{float f;
scanf("%f",&f);
if(f<0)f=-f;
printf("%d",f);}

#include<stdio.h>
#include <math.h>
#include <conio.h>
void main()
{
float a;
printf("Please Input the number:");
scanf("%f",&a);
printf("|%f|=%f",a,fabs(a));
getche();
}