fork download
  1. #include <stdio.h>
  2.  
  3. int main()
  4. {
  5.  
  6. int n;
  7.  
  8. printf("Enter an integer: ");
  9. scanf("%d", &n);
  10.  
  11. if (n%2 == 0){
  12. printf("%d is even.\n", n);
  13. }
  14.  
  15. if (n%2!=0){
  16. printf("%d is odd.\n", n);
  17. }
  18.  
  19. if (n%3==0){
  20. printf("%d is a multiple of 3.\n", n);
  21. }
  22.  
  23. if (n%5==0){
  24. printf("%d is a multiple of 5.\n", n);
  25. }
  26.  
  27. return 0;
  28. }
  29.  
Success #stdin #stdout 0s 5284KB
stdin
30
stdout
Enter an integer: 30 is even.
30 is a multiple of 3.
30 is a multiple of 5.