× Didn't find what you were looking for? Ask a question
Top Posters
Since Sunday
14
o
6
6
G
3
c
3
q
3
m
3
j
3
s
2
b
2
j
2
u
2
New Topic  
DJ DJ
wrote...
Posts: 772
10 years ago
Suppose the variables X and Y in the following Bare Bones program have the values 3 and 2, respectively, when execution begins.

   clear Z
   while X not 0:
    while Y not 0:
           decr Y
           incr Z
       incr Z
       decr X
   
What will be the value of Z when the program terminates?

   A. 0   B. 1   C. 5   D. 6

This is for my computing programming course
Read 2148 times
2 Replies

Related Topics

Replies
wrote...
10 years ago
CC
DJ Author
wrote...
10 years ago
Thanks for the homework help.
New Topic      
Explore
Post your homework questions and get free online help from our incredible volunteers
  1085 People Browsing
Related Images
  
 666
  
 261
  
 259
Your Opinion
What's your favorite coffee beverage?
Votes: 302