Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a program that calculates the mean, median and mode of a given array in the following manner: i) Write three functions mean (), median

Write a program that calculates the mean, median and mode of a given array in the following manner: i) Write three functions mean (), median () and mode () that calculates the mean, median and mode of an array. ii) Using these functions write a program that calculates all the three above mentioned values for two different arrays A and B where A is an array that contains the number of hours spent by a person each day for playing video games and B is an array that contains the number of hours spent by a person each day for his studies. iii) Based on the above mentioned values that you calculate using these functions compare the values obtained from both the arrays. If all the three values of array A is greater than array B print statement that warns the person to study. If all the three values of array B is greater than array A print statement that praises him for his studies. If all the three values are equal print statement that tells him he is well balanced. If any other issues, print Sorry cant come to an outcome.

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

Oracle Databases On The Web Learn To Create Web Pages That Interface With Database Engines

Authors: Robert Papaj, Donald Burleson

11th Edition

1576100995, 978-1576100998

More Books

Students also viewed these Databases questions

Question

Explain three broad global HR challenges.

Answered: 1 week ago

Question

What is group replacement? Explain with an example. (2-3 lines)

Answered: 1 week ago

Question

15-5 How will MIS help my career?

Answered: 1 week ago