Write a program that take a number from user and display “ Divisible by 3” if 3 completely divide the number.( % )
Write a program that take a number from user and display “ Divisible by 3” if 3 completely divide the number.( % ).
#include<stdio.h>
main()
{
int m;
printf("entrer a number");
scanf("%d",&m);
if ( m % 3== 0)
{
printf("number is divisible by 3 completely");
}
else
{
printf("number is NOT divisible by 3 completely");
}
}
Comments
Post a Comment