Determine the value that is printed at the end of the following pseudocodes:
What statement is printed at the end of the following pseudocode?
\text{START}\\ \text{SET } a=8\\ \text{IF } a\,/\,2 \text{ IS integer}\\ \qquad \text{THEN PRINT } "a \text{ is even}"\\ \text{ELSE PRINT} "a \text{ is odd}"\\ \text{END IF }\\ \text{END}
Consider the following pseudocode with steps in the wrong order:
Step | Code |
---|---|
A | \text{ SET } a=2 |
B | \text{ END} |
C | \text{ SET b=3} |
D | \text{ PRINT } a+b |
E | \text{ START} |
Arrange the steps of the algorithm in the correct order.
What is printed at the end of the code?
Consider the following pseudocode:
What does the code calculate?
Volume
Units
Area
Perimeter
What is the output of this code?
\text{START}\\ \text{SET } W=3\\ \text{SET } L=6\\ \text{SET } A=W*L\\ \text{PRINT } A\,"\text{m}^2"\\\text{END}
Consider the following pseudocode:
What does the code calculate?
Volume
Units
Area
Perimeter
What is the output of this code?
\text{START}\\ \text{SET } W=7\\ \text{SET } L=9\\ \text{SET } P=2*W+2*L\\ \text{PRINT } P\,"\text{m}"\\\text{END}