Question: For the given pseudocode a. D raw a control flow graph. Label the edges and the nodes in the graph with the corresponding code fragments.
For the given pseudocode
QUESTION 2 A pseudo code that reads eleven numbers from the wer and prints the average of these eleven numbers. Also counts the occurrence of number in the program. MAIN MODULE CREATE AVERAGE_OF_NUMBERS an object created to give a call to acher modules CREATE object for AVERAGE_OF_NUMBERS COMPUTE_INITIALIZE_VARIABLES COMPUTE_CALCULATE AVERAGE COMPUTE_DISPLAY_AVERAGE END WINITIALIZATION MODULE CREATE INITIALIZE_VARIABLES create array DECLARE and INITIALIZE MEMORY TO ARRAY ELEVEN_NUMBERS INITIALIZE an integer CLOCK to value INITIALIZE an integer SUM O value DECLARE a decimal variable AVERAGE INITIALIZE an integer i to value END CALCULATION MODULE CREATE CALCULATE_AVERAGE REPEAT READ ELEVEN NUMBERS! paspolate array IF ELEVEN NUMBERS[i] equals 6 check for the occurrence of number 6 INCREMENT CLOCK by 1 counter incremented in case umber found END IF UNTIL I equals 11 Auto increments value of and check the condition SETI =1 REPEAT SE SUM = SUM ELEVEN NUMBERS UNTIL 11 SET AVERAGE = SUM/11 END HOUTPUT MODULE CREATE DISPLAY_AVERAGE PRINT AVERAGE display average of devra umbes PRINT CLOCK display multiple occurrence of number 6 END
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
