Question

In: Computer Science

DESIGN A FLOWCHART IN THE APPLICATION FLOWGORITHM Number Analysis Program Design a program that asks the...

DESIGN A FLOWCHART IN THE APPLICATION FLOWGORITHM

Number Analysis Program Design a program that asks the user to enter a maximum of 20 numbers. The program should store the numbers in an array and then display the following data: -The lowest number in the array. -The highest number in the array. -The total of the numbers in the array. -The average of the numbers in the array.

PLEASE AND THANK YOU

Solutions

Expert Solution

Here is the completed solution for this problem. The program will let the user enter a maximum of 20 integers, or until he/she enter a sentinel value of -999 to end early.

I have attached both the code (which you can save to a file with extension: .fprg (for example: program.fprg) and open in Flowgorithm), and the screenshot of the flowchart. Comments are included, go through it, learn how things work and let me know if you have any doubts or if you need anything to change. If you are satisfied with the solution, please rate the answer. If not, PLEASE let me know before you rate, I’ll help you fix whatever issues. Thanks\

CODE:

<?xml version="1.0"?>
<flowgorithm fileversion="2.11">
    <attributes>
        <attribute name="name" value=""/>
        <attribute name="authors" value=" "/>
        <attribute name="about" value=""/>
        <attribute name="saved" value="2020-10-14 06:08:39 PM"/>
        <attribute name="created" value="RW5pZ21hO1RJVEFOSVVNOzIwMjAtMTAtMTQ7MDU6Mzc6MjkgUE07MjQ5Mg=="/>
        <attribute name="edited" value="RW5pZ21hO1RJVEFOSVVNOzIwMjAtMTAtMTQ7MDY6MDg6MzkgUE07MTsyNjAw"/>
    </attributes>
    <function name="Main" type="None" variable="">
        <parameters/>
        <body>
            <comment text="declaring variables"/>
            <declare name="numbers" type="Integer" array="True" size="20"/>
            <declare name="size, lowest, highest, total, value" type="Integer" array="False" size=""/>
            <declare name="average" type="Real" array="False" size=""/>
            <assign variable="size" expression="0"/>
            <comment text="looping"/>
            <do expression="size&lt;20 &amp;&amp; value!=-999">
                <output expression="&quot;Enter an integer (or -999 to quit): &quot;" newline="True"/>
                <input variable="value"/>
                <comment text="adding value to array if value != -999"/>
                <if expression="value!=-999">
                    <then>
                        <assign variable="numbers[size]" expression="value"/>
                        <comment text="if this is first value, setting it as total, lowest and highest"/>
                        <if expression="size==0">
                            <then>
                                <assign variable="total" expression="numbers[size]"/>
                                <assign variable="lowest" expression="numbers[size]"/>
                                <assign variable="highest" expression="numbers[size]"/>
                            </then>
                            <else>
                                <comment text="otherwise adding to total, updating lowest or highest if necessary"/>
                                <assign variable="total" expression="total+numbers[size]"/>
                                <if expression="numbers[size]&lt;lowest">
                                    <then>
                                        <assign variable="lowest" expression="numbers[size]"/>
                                    </then>
                                    <else/>
                                </if>
                                <if expression="numbers[size]&gt;highest">
                                    <then>
                                        <assign variable="highest" expression="numbers[size]"/>
                                    </then>
                                    <else/>
                                </if>
                            </else>
                        </if>
                        <comment text="updating size"/>
                        <assign variable="size" expression="size+1"/>
                    </then>
                    <else/>
                </if>
                <comment text="the loop will exit when the user enter -999 or when the user enter a maximum of 20 numbers"/>
            </do>
            <comment text="if size is 0 (no values entered), displaying error"/>
            <if expression="size==0">
                <then>
                    <output expression="&quot;No values entered&quot;" newline="True"/>
                </then>
                <else>
                    <comment text="otherwise finding average, displaying stats"/>
                    <assign variable="average" expression="total/size"/>
                    <output expression="&quot;The lowest number: &quot;&amp;lowest" newline="True"/>
                    <output expression="&quot;The highest number: &quot;&amp;highest" newline="True"/>
                    <output expression="&quot;The sum total: &quot;&amp;total" newline="True"/>
                    <output expression="&quot;The average: &quot;&amp;average" newline="True"/>
                </else>
            </if>
        </body>
    </function>
</flowgorithm>

SCREENSHOT:


Related Solutions

DESIGN A FLOWCHART IN THE APPLICATION FLOWGORITHM Exercise called: Number Analysis Program Design a program that...
DESIGN A FLOWCHART IN THE APPLICATION FLOWGORITHM Exercise called: Number Analysis Program Design a program that asks the user to enter a maximum of 20 numbers. The program should store the numbers in an array and then display the following data: 1-The lowest number in the array. 2-The highest number in the array. 3-The total of the numbers in the array. 4-The average of the numbers in the array. PLEASE AND THANK YOU
DESIGN A FLOWCHART IN FLOWGORITHM AND WRITE THE PSEUDOCODE Number Analysis Program Design a program that...
DESIGN A FLOWCHART IN FLOWGORITHM AND WRITE THE PSEUDOCODE Number Analysis Program Design a program that asks the user to enter a series of 20 numbers. The program should store the numbers in an array and then display the following data: The lowest number in the array. The highest number in the array. The total of the numbers in the array. The average of the numbers in the array. PLEASE AND THANK YOU
DESIGN A FLOWCHART IN THE APPLICATION FLOWGORITHM Exercise called: Number Analysis Program Requirement: Make two modules...
DESIGN A FLOWCHART IN THE APPLICATION FLOWGORITHM Exercise called: Number Analysis Program Requirement: Make two modules in function and two modules in regular mode that carry out the processes and print the particular result and two function modules where the results are printed in the main. Design a program that asks the user to enter a maximum of 20 numbers. The program should store the numbers in an array and then display the following data: 1-The lowest number in the...
DESIGN A FLOWCHART IN FLOWGORITHM Rainfall Statistics Design a program that lets the user enter the...
DESIGN A FLOWCHART IN FLOWGORITHM Rainfall Statistics Design a program that lets the user enter the total rainfall for each of 12 months into an array. The program should calculate and display the total rainfall for the year, the average monthly rainfall , and the months with the highest and lowest amounts. PLEASE AND THANK YOU
PLEASE DESCING A FLOWCHART IN FLOWGORITHM Test Average and Grade Write a program that asks the...
PLEASE DESCING A FLOWCHART IN FLOWGORITHM Test Average and Grade Write a program that asks the user to enter five test scores. The program should display a letter grade for each the five test score and the average test score. Design the following functions in the program : -calAverge This function should accept five test scores as arguments and return the average of the scores. -determineGrade This function should accept a test score as an argument and return a letter...
create flowchart using Flowgorithm and Pseudocode for the following program example:   Design a program for Jones...
create flowchart using Flowgorithm and Pseudocode for the following program example:   Design a program for Jones College. The current tuition is $12,000 per year, and tuition is expected to increase by 5 percent each year. Display the tuition amount for each year over the next five years (use a looping structure).
DESIGH A FLOWCHART IN FLOWGORITHM Speeding Violation Calculator. Design a program that calculates and displays the...
DESIGH A FLOWCHART IN FLOWGORITHM Speeding Violation Calculator. Design a program that calculates and displays the number of miles per hour over the speed limit that a speeding driver was doing. The program should ask for the speed limit and the driver's speed. Validate the input as follows: The speed limit should be at least 20, but not greater than 70. The driver's speed should be at least the value entered for the speed limit (otherwise the driver was not...
Number Analysis Program (Specific Design Specifications) Design a Python program that asks the user to enter...
Number Analysis Program (Specific Design Specifications) Design a Python program that asks the user to enter a series of 20 numbers. The program should store the numbers in a list then display the following data: The lowest number in the list The highest number in the list The total of the numbers in the list The average of the numbers in the list This python program must include the following functions. Your program must use the exact names, parameter lists,...
For this assignment, you will create flowchart using Flowgorithm to represent the logic of a program...
For this assignment, you will create flowchart using Flowgorithm to represent the logic of a program that allows the user to enter a number of dollars and convert it to Euros and Japanese yen. You will have to do some research on current rates of monetary exchange for this one. Don't forget to declare your variables and use output statements to prompt the user to enter specific values prior to including an input statement. You will use an assignment statement...
Design a program that asks the user for a number and the program computes the factorial...
Design a program that asks the user for a number and the program computes the factorial of that number and displays the result . Implement with two different modules - one that uses a for loop and one that uses a while loop Grading Rubrick Program Compiles Cleanly  syntax errors25 pts-5 per errorProgram runs without runtime errors ( validation)run-time errors 25 pts-5 per errorProgram give correct answersLogic errors30 pts-5 per errorProgram is repeatableNot repeatable5 pts-5 ptsProgram is well modularizedBarely Modularized10 pts-...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT