Programming Examples
Write a program to find the number in between 7 and 100 which is exactly divisible by 4 and if divided by 5 and 6 remainders obtained should be 4.
Write a program to find the number in between 7 and 100 which is exactly divisible by 4 and if divided by 5 and 6 remainders obtained should be 4?
Solution
# include <stdio.h>
# include <conio.h>
void main()
{
int x;
clrscr();
for(x=7;x<100;x++)
{
if(x%4==0 && x%5==4 && x%6==4)
{
printf(“\n Number : %d”,x);
}
}
getche();
}
Output
OUTPUT:
Number : 64