Math, asked by narendirank21, 9 months ago

The two numbers nearest 2000 which are exactly divisible by 4, 7, 8, 6, 5 are ____ and ____. Who answer first wil be marked as the brainllist

Answers

Answered by spacelover123
1

Step 1: Find the LCM of given numbers.

\begin{array}{r | l} 2 & 4,7,8,6,5 \\ \cline{2-2} 2 & 2,7,4,3,5 \\ \cline{2-2}  2& 1,7,2,3,5 \\ \cline{2-2} 3 & 1,7,1,3,5 \\\cline{2-2} 5 & 1,7,1,1,5 \\\cline{2-2}7&1,7,1,1,1\\ \cline{2-2}  & 1,1,1,1,1  \end{array}

LCM of 4, 7, 8, 6 and 5 is 840.

Step 2: Divide 2000 by 840 and find the remainder.

The remainder would be 320.

Step 3: Add and subtract the remainder with the number.

2000 - 320 = 1680

2000 + 320 = 2320

∴  The two numbers nearest 2000 which are exactly divisible by 4, 7, 8, 6, 5 are 1680 and 2320.

Answered by wataripg
1

It was easy enough to find with simple programming and the modulo operator. The closest workable number above 2000 is 2520. The closest workable number below 2000 is 1680.

#!/usr/bin/perl  

$num = 2000;

while ($num != 1)

{ $num--;

    if (($num % 4) || ($num  % 7) || ($num  % 8) || ($num  % 6) || ($num  % 5)) {

    ;

    } else { print "$num\n"; }

}

$num = 2000;

while ($num != 4000)

{ $num++;

    if (($num % 4) || ($num  % 7) || ($num  % 8) || ($num  % 6) || ($num  % 5)) {

    ;

    } else { print "$num\n"; }

}

Output:

1680      <- closest number below 2000

840        <- next one

2520      <- closest number above 2000

3360     <- next one

Similar questions