To check whether a number is divisible by 6 and 4
Input :
Output :
Code :
#include <stdio.h>
int main()
{
int c;
printf("Enter a number :\n");
scanf("%d",&c);
{ if ((c%6==0) && (c%4==0))
printf("The number is divisible by 6 and 4\n");
else
printf("The number is not divisible by 6 and 4\n");
}
return 0;
}
Input :
Output :
Code :
#include <stdio.h>
int main()
{
int c;
printf("Enter a number :\n");
scanf("%d",&c);
{ if ((c%6==0) && (c%4==0))
printf("The number is divisible by 6 and 4\n");
else
printf("The number is not divisible by 6 and 4\n");
}
return 0;
}
0 Comments:
Post a Comment