Question: pls provide code in C...you may use C math library functions such as sqrt and fabs III.B. STATISTICS Consider a list named X of n

 pls provide code in C...you may use C math library functions

pls provide code in C...you may use C math library functions such as sqrt and fabs

III.B. STATISTICS Consider a list named X of n real numbers The p-norm of the values in the list, here denoted 1 number such that 1p for some real number p > 1, is a real 72 Note: 221i is known as summation notation: 1 2i-Z1 + 22 + . .-+ Zn Example #1 : The taxicab norm, also known as the Manhattan norm, which is the p-norm with p of 1, is a real number calculated as the sum of all the absolute values of the values in the list Note that the name taxicab norm" comes from the fact that it's the distance that a taxicab would travel on streets with lengths equal to the values in the list. Example #2 : The Euclidean norml , denoted llx12, is the p-norm with p of 2 72 Write a program to calculate the statistics described above, for a list of 4 values. The program MUST incorporate the following subsections, in the following order 1. Greeting Subsection: Greet the user with useful information about the program. 2. Input Subsection (a) Prompt the user to input 4 values (b) Input the 4 values, using a single scanf statement. 3. Calculation Subsection (a) Calculate the taxicab norm of the 4 values (b) Calculate the square norm of the 4 values 4. Output Subsection (a) Output the 4 values (b) Output their taxicab norm (c) Output their square norm

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!