subject

Write a marie program to calculate some basic statistics on a list of positive numbers. the program will ask users to input the numbers one by one. assume that all numbers will be in the range 1 to 1000. to terminate the data entry, user will input any negative number. once the data entry is complete, the program will show four statistics about the list of numbers: (1) count (2) minimum value (3) sum of numbers (4) "mean/average" calculation.

as an example, if the user enters the following decimal numbers as input (one after the other)

23, 6, 78, 36, 3, 250, 127, 210, –5

the program would output the following values as the count, minimum, sum and mean respectively:

8
3
733
91

the average is calculated by dividing sum by count. note that marie does not support floating point numbers, hence the result of division will only have the integer part (as shown in above example, average is 91 instead of 91.625)

a simple algorithm for implementing division in marie is shown below.

let x = dividend, y = divisor, z = quotient (result) of division.

set initial z to 0
while x > y, do
set x to (x – y)
increase z by 1
endwhile

assume that the user will always provide valid numbers as input, that is, do not worry about dealing with invalid input data.

write comments within your program so that a reader can understand it easily.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 03:30
Identify at least three types of characteristics that you were asked about as you the computer identify a fruit.
Answers: 3
question
Computers and Technology, 22.06.2019 18:30
Which of these options are the correct sequence of actions for content to be copied and pasted? select content, click the copy button, click the paste button, and move the insertion point to where the content needs to be inserted. click the copy button, select the content, move the insertion point to where the content needs to be inserted, and click the paste button. select the content, click the copy button, move the insertion point to where the content needs to be inserted, and click the paste button. select the content, move the insertion point to where the content needs to be inserted, click the copy button, and click the paste button.
Answers: 3
question
Computers and Technology, 22.06.2019 22:00
Researchers measured the data speeds for a particular smartphone carrier at 50 airports. the highest speed measured was 78.1 mbps. the complete list of 50 data speeds has a mean of x overbarequals16.11 mbps and a standard deviation of sequals18.65 mbps. a. what is the difference between carrier's highest data speed and the mean of all 50 data speeds? b. how many standard deviations is that [the difference found in part (a)]? c. convert the carrier's highest data speed to a z score. d. if we consider data speeds that convert to z scores between minus2 and 2 to be neither significantly low nor significantly high, is the carrier's highest data speed significant? a. the difference is nothing mbps.
Answers: 3
question
Computers and Technology, 23.06.2019 01:30
Negative methods of behavior correction include all but this: sarcasm verbal abuse setting an example for proper behavior humiliation
Answers: 1
You know the right answer?
Write a marie program to calculate some basic statistics on a list of positive numbers. the program...
Questions
question
History, 30.04.2021 03:50
question
Physics, 30.04.2021 03:50
question
Engineering, 30.04.2021 03:50
question
Mathematics, 30.04.2021 03:50
question
Advanced Placement (AP), 30.04.2021 03:50
Questions on the website: 13722360