19 lines
266 B
C
19 lines
266 B
C
|
|
#include <stdio.h>
|
|
|
|
void put_int(int i) {
|
|
if (i < 0) {
|
|
putchar('-');
|
|
i *= -1;
|
|
}
|
|
char buf[10];
|
|
int j = 0;
|
|
do {
|
|
buf[j++] = i % 10 + '0';
|
|
i /= 10;
|
|
} while (i > 0);
|
|
while (j > 0)
|
|
putchar(buf[--j]);
|
|
}
|
|
|