Given the following sample of pseudo code:
01 Input number of male rabbits
02 Input number of female rabbits
03 If male rabbits > 0 and female rabbits > 0 then
04 Input Do you want to breed (Yes / No)
05 If breed = o?
05 If breed =?o
06 Print deep male and female rabbits apart!?
06 Print deep male and female rabbits apart!
07
End if 08 End If.
Which of the following test cases will ensure that statement 6 is executed?
A . male rabbits = 1, female rabbits = 1, breed = Yes male rabbits = 1, female rabbits = 1, breed = Yes?
B . male rabbits = 1, female rabbits = 1, breed = No male rabbits = 1, female rabbits = 1, breed = No?
C . male rabbits = 1, female rabbits = 2, breed = Yes male rabbits = 1, female rabbits = 2, breed = Yes?
D . male rabbits = 1, female rabbits = 0, breed = No male rabbits = 1, female rabbits = 0, breed = No?
Answer: B
Leave a Reply