Question: A loop should output 1 to n . If n is 5 , the output is 1 2 3 4 5 . What should XXX

A loop should output 1 to n. If n is 5, the output is 12345. What should XXX, YYY, and ZZZ be?
Flowchart has 2 variables (integer n, integer i) and 7 nodes. Node 1 is the start node and points to node 2. Node 2 code: n = Get next input Node 2 points to node 3. Node 3 code: XXX Node 3 points to node 4. Node 4 code: while YYY Node 4 points to nodes 5(condition is true) and 7(condition is false). Node 5 code: Put ZZZ to output Node 5 points to node 6. Node 6 code: i = i +1 Node 6 points to node 4. Node 7 is the end node.
a.
XXX: i =0/ YYY: i < n / ZZZ: i
b.
XXX: i =0/ YYY: i < n / ZZZ: i +1
c.
XXX: i =1/ YYY: i < n / ZZZ: i
d.
XXX: i =1/ YYY: i < n / ZZZ: i +1

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!