nerdexam
BCS-ISEB

ISEB-SWT2 · Question #34

Given the following sample of pseudo code: Read A, B, C: If A > B then Print Primary ratio is ?& A / B; End If If A > C then Print Secondary ratio is ?& A / C; End If. Which of the following test…

The correct answer is C. A = 10, B =5 and C = 2. See the full explanation below for the reasoning.

Question

Given the following sample of pseudo code:

Read A, B, C:

If A > B then Print Primary ratio is ?& A / B; End If If A > C then Print Secondary ratio is ?& A / C; End If. Which of the following test cases would achieve 100% statement coverage?

Options

  • AA = 5, B = 10 and C = 2
  • BA = 10, B = 10 and C = 10
  • CA = 10, B =5 and C = 2
  • DA = 2, B= 5 and C = 10

How the community answered

(48 responses)
  • A
    4% (2)
  • B
    13% (6)
  • C
    75% (36)
  • D
    8% (4)

Community Discussion

No community discussion yet for this question.

Full ISEB-SWT2 Practice