Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Without using Try and Catch. It is the inputting of non-integers and numbers less than 0 that have me stumped. Write a program called StatisticsCalculator

Without using Try and Catch. It is the inputting of non-integers and numbers less than 0 that have me stumped.

Write a program called StatisticsCalculator that calculates the mean (average) and standard deviation for a set of integer values entered by the user. Your program should

Prompt the user for the number of values, n. (n must be 1 or greater!) Output "You must enter an integer greater than 0" and reprompt the user if the number of values is not an integer value greater than 0.

Create an array to store the values.

Prompt the user for each value and store it in the array. Output "Invalid value" and reprompt if the user enters something other than an integer.

Calculate and output the mean of the values with 2 decimal places.

Calculate and output the standard deviation of the values (with 2 decimal places) using the formula given below:

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

Business Process Driven Database Design With Oracle PL SQL

Authors: Rajeev Kaula

1st Edition

1795532386, 978-1795532389

More Books

Students also viewed these Databases questions