What are the values of variable


Title: Loops and Methods 

What are the values of variables a, b, and c after each line of code of each logical section of the pseudocode. Show why the logical section is running, what happens during each run of that section and what the variable values are at the end of EACH RUN of the section. 

Display your logic in a MS Word table with three columns - line of code executed, why it executed, value of each variable. Each time a line of code executes, put this in the table. For example:

Line of Code Why It Executed Value of 
Executing each variable
While C>6 perform C>6 A=2,b=5,c=9
ChangeBandC

Be sure to follow the directions of this assignment. For example, if the first loop executes four times, you will need four lines inserted into the table, one for each time the loop executes.

The Program:
start
a = 2
b = 4
c = 10
while c > 6
perform changeBAndC()
endwhile
if a = 2 then
perform changeAAndB()
endif
if c = 10 then
perform changeAAndB()
else
perform changeBAndC()
endif
print a, b, c
stop

changeBAndC()
b = b + 1
C = C - 1
return

changeAAndB()
a = a + 1
b = B - 1
return  

Request for Solution File

Ask an Expert for Answer!!
Programming Languages: What are the values of variable
Reference No:- TGS0126234

Expected delivery within 24 Hours