fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. int Y ;
  5. int X; // 세미콜론 추가
  6.  
  7. while (1){
  8. printf("Enter an integer number less than 100: ");
  9. scanf("%d" , &X); // 따옴표 추가
  10.  
  11. if (X < 100){
  12. printf("Sorry the number you entered is less than 100\n");
  13. continue ;
  14. }
  15. break; // 세미콜론 추가
  16. }
  17.  
  18. Y = (X/10) % 10;
  19.  
  20. if (Y % 2 == 0){
  21. printf("The 2nd number of %d is %d and it is even\n", X, Y); // 세미콜론 추가
  22. }
  23. else{
  24. printf("The 2nd number of %d is %d and it is odd\n", X, Y); // 세미콜론 추가
  25. }
  26.  
  27. return 0;
  28. }
  29.  
Success #stdin #stdout 0.01s 5284KB
stdin
234
stdout
Enter an integer number less than 100: The 2nd number of 234 is 3 and it is odd