Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 1 (CO3, PO2, C4) The following Figure 1 shows partial flowchart (algorithm) of number processing with multiple possible output. Analyze the flowchart and trace

image text in transcribedimage text in transcribed

Question 1 (CO3, PO2, C4) The following Figure 1 shows partial flowchart (algorithm) of number processing with multiple possible output. Analyze the flowchart and trace the process and possible output of the program. Your analysis must include the followings: (a) Sample of possible inputs to the program so that all possible output can be produced at the end of the program (b) The flow of process and how the value of the variables in the program changes based on the input data (c) Trace and produce output based on input given in (a) (d) Conclude what are the process is done in each selection structure based on obtained result Read input choice TRUE choice=='A result1=0 numbers1 Read input number TRUE number>result1 result1=number FALSE FALSE TRUE numberl=0 FALSE Display result1 TRUE choices 'B' result1=0 result2=0 Read input number TRUE FALSE numberl=0 result1=result 1 + number result2++ FALSE Read input number Display invalid input result1=result1/result2 Display result 1 Read input cont TRUE cont==1 FALSE

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

The Database Experts Guide To SQL

Authors: Frank Lusardi

1st Edition

0070390029, 978-0070390027

More Books

Students also viewed these Databases questions

Question

Discuss the challenges in scanning the environment.

Answered: 1 week ago

Question

=+what information would you need about the compact disc industry?

Answered: 1 week ago