#include <stdio.h>
int main(){
int A;
printf("请输入一个整数:");scanf("%d", &A);
if (A>= 0)
{
printf("绝对值是%d\n", A);
}
else
{
printf("绝对值是%d\n", -A);
}
return 0;
}
标签:return,入门,int,scanf,练习,绝对值,printf,main From: https://blog.51cto.com/u_15866017/5931749
#include <stdio.h>
int main(){
int A;
printf("请输入一个整数:");scanf("%d", &A);
if (A>= 0)
{
printf("绝对值是%d\n", A);
}
else
{
printf("绝对值是%d\n", -A);
}
return 0;
}
标签:return,入门,int,scanf,练习,绝对值,printf,main From: https://blog.51cto.com/u_15866017/5931749