Defect Report

Write a defect report for this arithmetic issue. The program is supposed to add numbers properly and this is what you see:

1+1=2
1+2=3
1+3=4
2+2=3
2+3=5
2+4=6
3+3=5

Write a clear and concise description of the problem.

Editorial / Best Answer

ramesh7584

• Member Since Mar-2007 | Jan 13th, 2010

1+1=2
1+2=3
1+3=4
2+2=3
2+3=5
2+4=6
3+3=5

Report of the above results:
The loop used for incrementing the first value is not implemented properly. on every 4th iteration, first value is not treated as appeared.
See the highlighted values. In first highlighted calculation, still it is treating first value as '1' while calculating. and at last one it is treating it as '2' instead of 3.

Showing Answers 1 - 5 of 5 Answers

ramesh7584 Profile Answers by ramesh7584

• Jan 13th, 2010

1+1=2
1+2=3
1+3=4
2+2=3
2+3=5
2+4=6
3+3=5

Report of the above results:
The loop used for incrementing the first value is not implemented properly. on every 4th iteration, first value is not treated as appeared.
See the highlighted values. In first highlighted calculation, still it is treating first value as '1' while calculating. and at last one it is treating it as '2' instead of 3.

zaara Profile Answers by zaara

• Jan 18th, 2010

After doing addition three times using 1, now addition is done using 2.
As soon as this change in step is executed, addition is not done properly in that step.

Similarily is the case when addition using 2 is done thrice, now additoin is done using 3.
As soon as this is changed, additoin is not done properly in that step.

interviewg Profile Answers by interviewg

• Sep 27th, 2010

While adding X and Y, the result becomes X+Y-1 for when X=Y

harithajuluru Profile Answers by harithajuluru

• Dec 14th, 2010

We should also specify where x and y not equals to 1

Was this answer useful?  Yes

Asit Samal

• Dec 1st, 2011

Interviewer I think you are wrong because you have mentioned when X=Y then it is adding like: X+Y-1. But in case of 1+1=2 it is not adding like X+Y-1, rather it is adding as X+Y. So, ans should be : Except 1+1=2 in all other case it is adding like X+Y-1.

Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.