18 lines
221 B
C
18 lines
221 B
C
#include <stdio.h>
|
|
|
|
int main(void) {
|
|
int x, y;
|
|
|
|
printf("Input integer: ");
|
|
scanf("%d", &x);
|
|
|
|
y = x;
|
|
|
|
if (y < 0)
|
|
y = -y;
|
|
|
|
printf("Absolute value of %d is %d.\n", x, y);
|
|
|
|
return 0;
|
|
}
|