Infosys Company

A jail has 100 cells, numbered 1 to 100. The king Declares some sort of amnesty and orders the following.
step 1: make sure all Cells are closed
step2: reverse (if open, close; if close, open) those Cells whose numbers are divisible by 1 (in this step, all cells will be Opened);
step 3: reverse those that are divisible by 2 (in this step, All even numbered cells will be closed);
step 4: reverse those that are Divisible by 3;
step 5: reverse those divisible by 4;
step 6 to step 101: and so on . . .
step 102: release the prisoners in those cells which are finally Open. How many prisoners will be released, and from which cells?

Read Solution (Total 1)

Infosys Other Question

For readers interested in Pythagorean triplets with Consecutive natural numbers, take any odd number -- say 11 -- and square It. 11 squared = 121 = 2(60)+ 1. Add 60 squared to both sides to get 11 squared + 60 squared = 60 squared + 2(60) + 1 = (60 + 1) squared = 61 squared. What do we get? (11, 60, 61). Works every time. Prove it For a general case.
Can there be a line passing through all the four quadrants? If so, how?