#include <stdlib.h>
long int labs(long int j);
long long int llabs(long long int j);
#include <stdio.h>
#include <stdlib.h>
int main()
{
long int result;
long long int answer;
result = labs(-12345);
answer = llabs(-12345678910);
printf ("|-12345| = %d\n", result);
printf ("|-12345678910| = %lld\n", answer);
return 0;
}
./labs
|-12345| = 12345
|-12345678910| = 12345678910
欢迎光临 曲径通幽论坛 (http://www.groad.net/bbs/) | Powered by Discuz! X3.2 |