Please think of a number between 1 and 1 00Your number divided by 3 has a remainder of 1Your number divided by 4 has a remainder of 0Your number divided by 7 has a remainder of 5Let me think a moment ..
Your number was 40
#include<stdio.h>
int main()
{
int x,a,b,c;
printf("Please think of a number between 1 and 100\n");
printf("Your number divided by 3 has a remainder ");
scanf("%d",&a);
printf("Your number divided by 4 has a remainder ");
scanf("%d",&b);
printf("Your number divided by 7 has a remainder ");
scanf("%d",&c);
for(x=0;x<100;x++)
{
if(((x-a)%3==0)&&((x-b)%4==0)&&((x-c)%7==0))
printf("Let me think a moment…\nYour number was %d\n",x);
}
return 0;
}