Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

(b) Write a MARIE program to calculate some basic statistics on a list of positive numbers. The program will ask users to input the numbers

(b) 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, the user will input any negative number. Once the data entry is complete, the program will show four statistics about the list of numbers: (i) Count, (ii) Minimum value, and (iii) Sum of the numbers.

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 and sum respectively:

8

3

733

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.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Medical Image Databases

Authors: Stephen T.C. Wong

1st Edition

1461375398, 978-1461375395

More Books

Students also viewed these Databases questions

Question

The inner product is a continuous bilinear functional.

Answered: 1 week ago

Question

Apply your own composing style to personalize your messages.

Answered: 1 week ago

Question

Format memos and e-mail properly.

Answered: 1 week ago