[정올] Language Coder_반복제어문1_자가진단3_code538 (C)

두비니

·

2020. 3. 13. 00:36

 

 

#include <stdio.h>

int main() {
	int a, sum = 0;

	while (1) {
		printf("number? ");
		scanf("%d", &a);
		if (a < 0)
			printf("negative number\n");
		else if (a > 0)
			printf("positive integer\n");
		else
			break;
	}

	return 0;
}