1. What is the output of code corresponding to the following pseudocode? Declare
ID: 3535748 • Letter: 1
Question
1. 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
2. What is the output of the code corresponding to the pseudocode shown?
Declare G As Integer
Declare H As Integer
Set G = 7
While G <= 8
Set H = 6
While H <= 7
Write G + H
Set H + H + 1
End While(H)
Set G = G + 1
End While(G)
3. What will be displayed after code corresponding to the following pseudocode is run?
Declare A As Integer
Declare B As Integer
Declare C As Integer
Set A = 3
While A <= 6
Set B = (2 * A) – 1
Write B
Set C = A
While C <= (A+1)
Write C
Set C = C + 1
End While(C)
Set A = A + 2
End While(A)
. What does the following program segment do?
Declare Count As Integer
Declare Sum As Integer
Set Sum = 0
For (Count = 1; Count < 50; Count++)
Set Sum = Sum + Count
A. 5,7 B. 5,5,7.5,7 C. 5,5,7,7 D. 2,5,3,7Explanation / Answer
1)b...because the type declared at starting can never change
2)d.. follow simple concept of looping
3)c..follow simple concept of looping
4)c... although it doesnt write but value in sum will sum of all nts form 1 to 49
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.