
Contributing Member
Find the number....
Find the number using the following condition.
If you divided by 9, you will get the remainder 8
If you divided by 8, you will get the remainder 7
If you divided by 7, you will get the remainder 6
If you divided by 6, you will get the remainder 5
If you divided by 5, you will get the remainder 4
If you divided by 4, you will get the remainder 3
If you divided by 3, you will get the remainder 2
If you divided by 2, you will get the remainder 1
Clue: The number is less than 3000.

suresh

Junior Member
Re: Find the number....
Hi suresh,
The number is 2519.
Regards,
Elango

Junior Member
Re: Find the number....
thanx Elango
is there any logic?
explain it

Expert Member
Re: Find the number....
It is very simple Sowji,
find LCM of 2,3,4...8 and 9 then subtract 1 from that number. that is it
Thanks,
James

Junior Member
Re: Find the number....
Hey can u please tell me whats the logic behind in taking L.cm's and subracting 1 from it..
Thanx in advance...............

Junior Member

Junior Member
Re: Find the number....
I know how to make it
follow the c code:
#include<stdio.h>
void main()
{
for(int q=1;q<30000;q++)
{
if((q%9==8)&&(q%8==7)&&(q%7==6)&&(q%6==5)&&(q%5==4)&&(q%4==3)&&(q%3==2)&&(q%2==1))
{
printf("%d",q);
break;
}
}
}

Junior Member
Re: Find the number....
Ur Logic is correct Chayan.
The answer is 2519.

Junior Member

Junior Member

Junior Member
Posting Permissions
 You may not post new threads
 You may not post replies
 You may not post attachments
 You may not edit your posts

Forum Rules