Question

The flow chart below describes the function TestQuestion and includes two loops. Which of the functions matches the logic ivoid TestQuestion) Loop! 18; Loop2 15; Answer = 0; for (Loop! = 15; Loop! ; 21; Loop! += 3) { Answer-= 2; for (Loop2 18; Loopvoid TestQuestion() { Loop 15; Loop2 18; Answer = 2; for (Loop1-15; Loop! ; 21; Loop! += 2) { Answer-= 3; for (Loop2 = 18; LoThe flow chart below describes the function TestQuestion and includes two loops. Which of the functions matches the logic ivoid TestQuestion() Loop! 0; Answer 0 for (Loop! = 0; Loop! < 21; Loop! += 1) { Answer += 2; for (Loop2 = 2; Loop2 <=; 8; Loovoid TestQuestion() Loop1- 0; Loop2 = 2; Answer = 0; for (Loop! 2; Loop! 〈=; 8; Loop! += 5) { Answer5; for (Loop2 = 0; Loop2The following code is located in the setup() routine so that it only executes once. The value of the integer Answer is print

The flow chart below describes the function "TestQuestion" and includes two loops. Which of the functions matches the logic in the flow chart? (notice the order of the flow chart) Flow Chart Template 01 Set Loop2 to Set Loop1 to 15 Set Answer to 0 Start Is Loop1 less than or equal to 21? No Yes Is Loop2 greater than or equal to 8? Subtract2 from Answer Add 3 to Loop1 End 0 Yes Subtract2 from Loop2 Subtract5 from Answer
void TestQuestion) Loop! 18; Loop2 15; Answer = 0; for (Loop! = 15; Loop! ; 21; Loop! += 3) { Answer-= 2; for (Loop2 18; Loop2 〉=; 8; Loop2-= 2) { Answer5; void TestQuestion) Loop 15; Loop2 = 18; Answer = 0; for (Loop! 18; Loop! 〉=; 8; Loop! -= 2) { Answer-= 5; for (Loop2 = 15; Loop2 ; 21; Loop2 += 3) { Answer2; void TestQuestion) Loop 15; Loop2 = 18; Answer = 0 for (Loop! = 18; Loop!-; 8; Loop! -= 5) { Answer2; for (Loop2 = 15; Loop2 ; 21; Loop2 += 2) { Answer-3;
void TestQuestion() { Loop 15; Loop2 18; Answer = 2; for (Loop1-15; Loop! ; 21; Loop! += 2) { Answer-= 3; for (Loop2 = 18; Loop2 〉=; 8; Loop2-= 2) { Answer -5; void TestQuestion() { Loop 15; Loop2 18; Answer 0; for (Loop! = 15; Loop1 〈=; 21; Loop! += 3) { Answer 2; for (Loop2 = 18; Loop2 〉=; 8; Loop2-= 2) { Answer-= 5; void TestQuestion) Loop! = 15; Loop2 = 18; Answer = 0; for (Loop! = 15; Loop! ; 21; Loop! += 2) { Answer -- 3; for (Loop2 = 18; Loop2 〉=; 8; Loop2-= 5) { Answer 2;
The flow chart below describes the function "TestQuestion" and includes two loops. Which of the functions matches the logic in the flow chart? (notice the order of the flow chart) Flow Chart Template 01 Set Loop1 to Set Loop2 to Set Answer to 0 Start Is Loop1 less than 21? Yes Is Loop2 less than or equal to 8? Add 2 to Answer Add 1 to Loop1 No End Yes Add 5 to Loop2 Subtract5 from Answer
void TestQuestion() Loop! 0; Answer 0 for (Loop! = 0; Loop!
0 0
Add a comment Improve this question Transcribed image text
Answer #1

for the first flow chart ,first snippet matches exactly.

for the second flow chart,first snippet matched exactly.

after running the last snippet ,the value of Answer is 1420.

beacause for every inner loop ,it increments by 2 times and then increments by 18 before startin next loop

so finally we get 1420

Add a comment
Know the answer?
Add Answer to:
The flow chart below describes the function "TestQuestion" and includes two loops. Which of the functions matches the logic in the flow chart? (notice the order of the flow chart) Flow Chart...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT