fork download
  1. #include<stdio.h>
  2. int main()
  3. {
  4. int a;
  5. printf("One integer please: ");
  6. scanf("%d",&a);
  7. if (a%2==0)
  8. printf("\n%d is even\n", a);
  9. else
  10. printf("\n%d is odd\n", a);
  11. return 0;
  12. }
  13.  
stdin
7
compilation info
prog.c: In function ‘main’:
prog.c:6: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result
stdout
One integer please: 
7 is odd