Advertisement
lIlIlIlIIlI

Introduction_lousyIfElse

Sep 9th, 2019
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.32 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main(){
  4.     int a;
  5.     int num;
  6.    
  7.     printf("enter a number: ");
  8.     scanf("%d", &num);
  9.     if (num > 0) printf("Odd\n");
  10.     else printf("Even\n");
  11.     printf("a = %d\n", a);
  12.     return 0;
  13. }
  14.  
  15. /*
  16. 輸入:
  17. 負數 or 0
  18.  
  19. 輸出:
  20. Even
  21. a = 0
  22.  
  23. */
  24.  
  25.  /*
  26. 輸入:
  27. 正整數N
  28.  
  29. 輸出:
  30. Odd
  31. a = 0
  32.  
  33. */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement