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
  • This problem is of moderate complexity and illustrates how a flow chart can be useful in making a working code. Write...

    This problem is of moderate complexity and illustrates how a flow chart can be useful in making a working code. Write a function called myFind that accepts two inputs M and key, where M is an array of any size and key is a scalar. The function uses nested for-loops to search M for all locations of key. The function returns two equally sized column vectors I and J, containing the rows and columns, respectively, of every occurrence of key...

  • In Parts This Skill Builder will require you to write several functions in which loops will...

    In Parts This Skill Builder will require you to write several functions in which loops will be the focus. In addition, some of these function will require you to design and implement finite state machines. So, let's get started! The template below has a class called SkillBuilder6 with a set of skeleton methods provided. The requirements for each method is provided below Left Triangle In the template below, SkillBuilder6 has a method with the following signature: public static String leftRightTriangle...

  • styles Use the chart below to answer the following questions regarding flow chart symbols. DOWS 18)...

    styles Use the chart below to answer the following questions regarding flow chart symbols. DOWS 18) Which symbol would be used in a flowchart to represent the symbol for a file? A) #9 B) #5 C) #6 D) #15 19) Which symbol would be used in a flowchart to represent manually prepared control totais? A) #9 B) #10 C) #4 D) #7 20) Which symbol would be used in a flowchart to represent a purchase order? A) #2 B) #1...

  • Using the Random, write a simulation that will "play" the California Super LOTTO. Your program logic will allow the player to: 1) Pick any 6 integer numbers from 1 - 70. Your logic should prev...

    Using the Random, write a simulation that will "play" the California Super LOTTO. Your program logic will allow the player to: 1) Pick any 6 integer numbers from 1 - 70. Your logic should prevent the player from selecting a value LESS than 1 or greater than 70. The logic should prevent the player from selecting the SAME number (i.e. they cannot have two or more of their selections be the SAME number). 2) Display the players' 6 number selections...

  • For this assignment, you will apply what you learned in analyzing for, while, and do-while loops...

    For this assignment, you will apply what you learned in analyzing for, while, and do-while loops by writing these statements yourself. The Java™ program you write should do the following: Display a pyramid of asterisks onscreen (i.e., a nested for loop) Display the integers 10 to 1 in decreasing order, one number per line (i.e., a while/do-whlie loop) Add 7 until the sum becomes greater than 157, at which point the program should display both the sum and the number...

  • Please draw a flow chart for each method please and thank you. Write a program that...

    Please draw a flow chart for each method please and thank you. Write a program that first gets a list of integers from input. The input begins with an integer indicating the number of integers that follow. Then, get the last value from the input, and output all integers less than or equal to that value. Assume that the list will always contain less than 20 integers. Ex: If the input is: 5 50 60 140 200 75 100 the...

  • Refer to the table Factors for Computing Control Chart Limits (3 sigma) for this problem. Pet...

    Refer to the table Factors for Computing Control Chart Limits (3 sigma) for this problem. Pet Products, Inc., caters to the growing market for cat supplies, with a full line of products ranging from litter to toys to flea powder. One of its newer products, a tube of fluid that prevents hairballs in long-haired cats, is produced by an automated machine set to fill each tube with 63 5 grams of paste To keep this filling process under control, four...

  • The following stem-and-leaf chart reports the number of movies rented per day at Video Connection: 12...

    The following stem-and-leaf chart reports the number of movies rented per day at Video Connection: 12 0 2 3 4 5 5 7 13 1 2 3 14 6 8 8 9 15 4 7 8 16 3 5 17 2 4 5 6 8 18 2 6 8 19 1 3 4 5 6 20 0 3 4 6 7 9 21 2 2 3 9 22 7 8 9 23 0 0 1 7 9 24 8 25...

  • What is the cumulative frequency chart of the series below?k=5 57 8 9 10 12 13...

    What is the cumulative frequency chart of the series below?k=5 57 8 9 10 12 13 14 14 14 14 18 20 25 33 37 39 41 41 43 AS LL US UL fi si SAD CIV -Den Daha Az -Less than 0 4,5 5 12 6 8,5 12,5 6 13 20 5 16,5 20,5 11 21 00 2 24,5 28,5 13 29 36 2 32,5 36,5 15 37 un 44 40,5 44,5 20

  • Use the attached spreadsheet to complete a two-pass c-Chart analysis of the case contained with it....

    Use the attached spreadsheet to complete a two-pass c-Chart analysis of the case contained with it. Use this spreadsheet AutoSave C u09a3 c-Chart Homework BLANK (1) Protected View ... Search Fadwa Toumi Ben Chekroun FT File Home Insert Formulas Page Layout Review View Data Help FOXIT PDF Share Com PROTECTED VIEW Be careful-files from the internet can contain viruses. Unless vou need to edit it's safer to stay in Protected View Enable Editing A2 fr X u09a3 HOMEWORK F G...

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