thoughtworks
Company
Logical Reasoning
Coding Decoding
The purpose of the following flow-chart is to double the number in each of the boxes: 13, 10, 7 and 4.
In order to accomplish exactly this -- no more and no less -- what is the smallest number which may be in box 14?
Box # 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
START
>
1 Add: (number in box 13) + ( number in box 13), put result into box 13.
2 Change Instruction 1: Decrease all box-numbers mentioned in it, by 3.
NO 3 Is (number in box 14) greater than the second box-number mentioned in
Instruction 1?
YES
END What is the SMALLEST number which may be in box 14?
Read Solution (Total 5)
-
- we need to fill 13,10,7 and 4 with double number. (No flow chart here..........)
Starting with 13 th box---->2x next box number will changed to 10.
let say number in box 14) greater than the second box-number 10 ----->no
So I am considering loop goes to 1st instruction and again number in 10+number in 10---->
again 10 becomes 7 next 7 becomes 4 next 4 becomes (4-3) 1.
Here, as per the 3rd statement :(number in box 14) greater than the second box-number 1---->
If it is 1>1 it is flase.
So next number 2>1 ----> True and loop ends & comes to end.
So number in box 14 is 2.
- 10 years agoHelpfull: Yes(11) No(2)
- smallest is twise the value in 13th box+1
- 9 years agoHelpfull: Yes(1) No(1)
- please dont follow my answer for this ques4ion friends... jyotsnas answer is perfect... sorry for posting wrong answer
- 9 years agoHelpfull: Yes(0) No(0)
- i can't understand anyone plz explain it.
- 9 years agoHelpfull: Yes(0) No(0)
- superbzzz problem
- 7 years agoHelpfull: Yes(0) No(0)
thoughtworks Other Question