Develop a C-code to calculate average, median and standard deviation, using 5 numbers as data you...

80.2K

Verified Solution

Question

Basic Math

Develop a C-code to calculate average, median and standarddeviation, using 5 numbers as data you input from the keyboard fromcalculations and compare program output with the hand calculationsshown with formula for average, median & standarddeviation..

Use suggested approach below for developing the code (otherapproaches are also possible):

In main     define an array of size = 5,

Read in 5 decimal numbers and print the chosen numbers forinput; Store input as a array and work with the array only;

define a pointer pointing to the beginning of an array,

pass the array using pointer to function to function_average tocompute ‘average’ that is passed back to main;

pass the array using pointer to function to function_median tocompute ‘median’ that is passed back to main;

pass the array using pointer to function_standard_derivation tocompute ‘standard deviation’ that is pass bac to main;

print results of the computed ‘average’, ‘median’ and ‘standarddeviation’ with words of

‘Average of the input five numbers are’, ‘Median of the inputfive numbers is’ and ‘Standard Deviation of the input five numbersis”

Create function_average

Create function_median,

Create function_standard_derivation

Answer & Explanation Solved by verified expert
4.0 Ratings (835 Votes)
the code is given belowincludeincludeint main double abcde Define 5 variablesdouble avg meansd define average Mean    See Answer
Get Answers to Unlimited Questions

Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!

Membership Benefits:
  • Unlimited Question Access with detailed Answers
  • Zin AI - 3 Million Words
  • 10 Dall-E 3 Images
  • 20 Plot Generations
  • Conversation with Dialogue Memory
  • No Ads, Ever!
  • Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!
Become a Member

Other questions asked by students