25 lines
443 B
C
25 lines
443 B
C
#include <stdio.h>
|
|
|
|
int main(void) {
|
|
int n;
|
|
int retry = 1;
|
|
|
|
do {
|
|
printf("Input integer: ");
|
|
scanf("%d", &n);
|
|
|
|
if (n > 0) {
|
|
printf("%d is positive.\n", n);
|
|
} else if (n < 0) {
|
|
printf("%d is negative.\n", n);
|
|
} else {
|
|
printf("It is zero.\n");
|
|
}
|
|
|
|
printf("Retry? [1/0]: ");
|
|
scanf("%d", &retry);
|
|
} while (retry == 1);
|
|
|
|
return 0;
|
|
}
|