![]() |
Pseudocode Explanation Needed
Hi,
Please look at the below pseudocode and help me understand in as much detail as possible why the value of variable A would be 32. Thanks. SET A TO 1 SET B TO 3 SET A TO A + B WHILE A < 20 SET A TO (A*A)/2 END WHILE |
Re: Pseudocode Explanation Needed
a=4
set a=(4*4)/2 a=8 a < 20 true do loop again set a = (8*8)/2 a=32 |
Re: Pseudocode Explanation Needed
Very helpful. Thanks!
|
Re: Pseudocode Explanation Needed
no problem. Good Luck
|
Re: Pseudocode Explanation Needed
Consider working through such things step by step, with pencil and paper. Microprocessors are not magic. They do precisely what is asked of them.
|
Re: Pseudocode Explanation Needed
Code:
#include<iostream.h> |
| All times are GMT +5.5. The time now is 18:52. |