Professional Documents
Culture Documents
The Output of The Following Pseudocode Is - 1) Set A 6, B 3, C 2 2) If (B A && A C && C B) 3) B A + 1 4) Else 5) A B + 1 6) End-If 7) Print A + B + C
The Output of The Following Pseudocode Is - 1) Set A 6, B 3, C 2 2) If (B A && A C && C B) 3) B A + 1 4) Else 5) A B + 1 6) End-If 7) Print A + B + C
1) Set a = 6, b =3, c = 2
2) if(b>a && a>c && c>b)
3) b=a+1
4) Else
5) a=b+1
6) End-if
7) Print a + b + c
Question
The output of the following pseudocode is ________
1) Set a = 6, b =3, c = 2
2) if(b>a && a>c && c>b)
3) b=a+1
4) Else
5) a=b+1
6) End-if
7) Print a + b + c
Question
Which of the following series will be printed by the given pseudocode?
1) Integer i, j, k, n
2) Set j=1, k=1
3) For (each i from 1 to 5)
4) print k
5) j=j+1
6) k=k+j
7) End-for
a) 1 3 6 10 15
b) 1 2 3 4 5
c) 4 6 8 10
d) 1 1 2 3 5
Question
What will be the output of the following pseudocode if a=10 and b=6?
a) 2
b) 4
c) 3
d) 1
Question
What would be the output of the following pseudocode?
1) Integer i, j, k
2) Set k = 6
3) For (each i from 1 to 1)
4) For (each j from the value of i to 1)
5) print k+1
6) End-for
7) End-for
a) 2
b) 6
c) 7
d) 5