Ask Question
Today, 09:03

What is the output of code corresponding to the following pseudocode?

Declare A As Integer

Declare B As Float

Set A = 2

While < = 3

Set B = 2.5 * A

Write B

Set B = Int (B)

Write B

Set A = A + 1

End While

Answer

A.

5,7

B.

5,5,7.5,7

C.

5,5,7,7

D.

2,5,3,7

+1
Answers (1)
  1. Today, 10:33
    0
    B

    Explanation:

    The while statement has a typo. It should be While A < = 3

    So A goes through the values 2 and 3.

    For the value A=2, the program prints 5 and 5

    For the value A=3, the program prints 7.5 and 7, where 7 is the truncated version of 7.5.
Know the Answer?
Not Sure About the Answer?
Find an answer to your question ✅ “What is the output of code corresponding to the following pseudocode? Declare A As Integer Declare B As Float Set A = 2 While < = 3 Set B = ...” in 📘 Computers and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers