fork download
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. int main(void) {
  5.  
  6. int n;
  7.  
  8. printf("정수를 입력하세요: ");
  9. scanf("%d", &n);
  10.  
  11. if (n>0) {
  12. printf("양수입니다.\n");
  13. } else if (n<0){
  14. printf("음수입니다.\n");
  15. } else {
  16. printf("0입니다.\n");
  17. }
  18.  
  19. return 0;
  20.  
  21. }
  22.  
Success #stdin #stdout 0.01s 5292KB
stdin
10
stdout
정수를 입력하세요: 양수입니다.