Question

In: Computer Science

[15 marks] Draw the flowchart of the following programming problem: You can draw the flowchart using...

[15 marks] Draw the flowchart of the following programming problem: You can draw the flowchart using a drawing tool, or draw the flowchart on a piece of paper, take a picture, insert it here or save it in the submission folder The program reads an unspecified number of integers until a zero is entered. While the program reads each number it counts the number of positive numbers and the number of negative numbers that have been entered and sum up the values of the numbers entered. After the user enters zero, the program computes the average of the input values, not counting the zero. At the end the program displays the average, and the counts of positive numbers and negative numbers

Solutions

Expert Solution

Here is the flowchart for the above problem. It is created using Flowgorithm.

NOTE:

n is the total number of numbers entered by the user, sum and avg are the variables used to store the sum and the avg, respectively. Also, the while loop terminates when the user enters 0, until when it keeps count of all the negative numbers entered and the positive numbers entered. At the end of the loop, we display the results.

Here is a working example for the same:


Related Solutions

For the following problem, draw a flowchart, write a function and then execute the function with...
For the following problem, draw a flowchart, write a function and then execute the function with your choice of input parameter values: For given two input parameters: If parameter 1 is smaller than parameter 2 return the remainder of parameter 1 by parameter 2 Otherwise, return the multiplication of two input parameters. Python programming language
Write the Flowchart for the following programming problem based on the pseudocode below. Last year, a...
Write the Flowchart for the following programming problem based on the pseudocode below. Last year, a local college implemented rooftop gardens as a way to promote energy efficiency and save money. Write a program that will allow the user to enter the energy bills from January to December for the year prior to going green. Next, allow the user to enter the energy bills from January to December of the past year after going green. The program should calculate the...
Write an algorithm and draw a flowchart for the following problem: Create an adaptive cruise control...
Write an algorithm and draw a flowchart for the following problem: Create an adaptive cruise control for a car. Include functions for enabling/disabling the cruise control; setting up the speed. The system should always maintain the speed unless there is a slower car in front of it. Make sure to define inputs and outputs. Do not forget that computer’s microprocessor works in very small steps (tiny steps!), so be careful not to assign large number of steps to one flowchart...
6. Write a program in C programming (compile and run), a pseudocode, and draw a flowchart...
6. Write a program in C programming (compile and run), a pseudocode, and draw a flowchart for each of the following problems: a) Obtain three numbers from the keyboard, compute their product and display the result. b) Obtain two numbers from the keyboard, and determine and display which (if either) is the smaller of the two numbers. c) Obtain a series of positive numbers from the keyboard, and determine and display their average (with 4 decimal points). Assume that the...
Draw a flowchart that will calculate the roots of a quadratic equation. (java) Can someone draw...
Draw a flowchart that will calculate the roots of a quadratic equation. (java) Can someone draw it for me? and at same time explain,
Develop an Algorithm and java program using Design Recipe for the following problems. Draw a flowchart...
Develop an Algorithm and java program using Design Recipe for the following problems. Draw a flowchart to compute the largest and smallest of 4 numbers : Write a Java Program for the above flowchart, use methods(functions), and nested if-else statements. Take input from the user using the Scanner object. Use separate methods to compute the Largest and Smallest of the numbers. Method 1 Name: findLargest(param 1, param 2, param 3, param 4) Method 2 Name: findSmallest(param 1, param 2, param...
For this problem you should describe the algorithm using a flowchart and then write Python code...
For this problem you should describe the algorithm using a flowchart and then write Python code to implement the algorithm. You are to create a Python program file for your code. Include in your HW document a photo of your flowchart and a screenshot of your program file and the output in IDLE that results when you run the program. The algorithm: Ask the user to input their annual salary and then calculate and print the weekly salary (annual/52). I...
Write a Problem analysis chart  & an algorithm, create an IPO and draw a flowchart for solving...
Write a Problem analysis chart  & an algorithm, create an IPO and draw a flowchart for solving a Quadratic equation.
i could use the flowchart and pseudocode solutions for the following: 1.       1.  Draw a structured flowchart describing...
i could use the flowchart and pseudocode solutions for the following: 1.       1.  Draw a structured flowchart describing the steps you would take to bake pancakes in a pan.  Include at least one decision. 2.       2.  Create the pseudocode to go along with the flowchart created in question above.
Using the information given below draw and label a flowchart of the processes involved in production...
Using the information given below draw and label a flowchart of the processes involved in production of phthalic anhydride. Use boxes and/or other symbols to represent process units and lines with arrows to represent inputs and outputs. Indicate the process conditions. Phthalic anhydride (PA) is produced via partial oxidation of o-xylene using oxygen. The feed to the plant is o-xylene and air. Air is compressed to approximately 2 bar in a centrifugal compressor and heated to 360°C using high-pressure steam...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT