-
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
[COLOR="Orange"][COLOR="Blue"][B]Clue:[/B][/COLOR] [B]The number is less than 3000.[/B][/COLOR]
----------------------
suresh
-
Re: Find the number....
Hi suresh,
The number is 2519. :)
Regards,
Elango
-
Re: Find the number....
thanx Elango
is there any logic?
explain it
-
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
-
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...............
-
Re: Find the number....
-
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;
}
}
}
-
Re: Find the number....
Ur Logic is correct Chayan.
The answer is 2519.
-
Re: Find the number....
-
Re: Find the number....
-
Re: Find the number....