Find A Number Which is a Multiple of 2 & 5

#include "stdio.h"
int main(void)
{
  int a;
  printf("Input an integer and push return:\n");
  scanf("%d", &a);
  if (a%2==0 && a%5==0)
  {          
    printf("%d is a multiple of 2 and 5\n", a);
  }                                 
  else
  {                            
    printf("%d is not a multiple of both 2 and 5\n", a); 
  }                                
  system("pause");
  return 0;
}

0 comments:

Post a Comment