Computers and Technology, 25.01.2020 06:31 rindragon8231
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.
Answers: 1
Computers and Technology, 23.06.2019 12:00
Which of these is a benefit of using objects in a powerpoint presentation? a. collaborators can create the external files while you create and edit the slide show. b. you can easily change the theme and design of the presentation. c. you can have older data in the source file while having up-to-date data in the presentation. d. collaborators can easily share the presentation.
Answers: 2
Computers and Technology, 23.06.2019 19:30
Of the following pieces of information in a document, for which would you most likely insert a mail merge field?
Answers: 3
Computers and Technology, 24.06.2019 09:40
Healthy study habits are best described as
Answers: 1
Computers and Technology, 24.06.2019 17:30
What is the next step if your volume does not work on computer
Answers: 2
Write a marie program to calculate some basic statistics on a list of positive numbers. the program...
Mathematics, 26.10.2020 21:40
Mathematics, 26.10.2020 21:40
Health, 26.10.2020 21:40
Geography, 26.10.2020 21:40
English, 26.10.2020 21:40
Mathematics, 26.10.2020 21:40
Advanced Placement (AP), 26.10.2020 21:40
Mathematics, 26.10.2020 21:40
Biology, 26.10.2020 21:40
Social Studies, 26.10.2020 21:40
Mathematics, 26.10.2020 21:40
English, 26.10.2020 21:40
English, 26.10.2020 21:40