## CS13002 Programming and Data Structures | ## Section 3/C, Spring 2003--2004 |

## Assignment 1

## The exercise

Read five positive real numbersa,b,c,dandefrom the user and compute their

Arithmetic meanAM= (a+b+c+d+e) / 5Geometric meanGM= 5th root ofabcdeHarmonic meanHM= 5 / [ (1/a) + (1/b) + (1/c) + (1/d) + (1/e) ]Standard deviation^{ }SD= Square root of [(a^{2}+b^{2}+c^{2}+d^{2}+e^{2}) / 5 - (AM)^{2}]

## Sample output

a = 2.1 b = 3.2 c = 4.3 d = 5.4 e = 6.5 AM = 4.300000 GM = 3.992353 HM = 3.675714 SD = 1.555635

## Test input

Show the output of your program on the following two sets of input:## Input 1

a = 2 b = 29 c = 541 d = 7919 e = 104729## Input 2

a = 148.41315910 b = 54.59815003 c = 20.08553692 d = 7.389056099 e = 2.718281828