Script started on Fri Nov 12 18:18:02 2004

cox $ gcc -lm -Wall m2120_f04_a3q1.c

cox $ a.out
This program computes various means of two given positive numbers
Please enter the value of x=1
Please enter the value of y=4
You entered: x=1.000000, y=4.000000
Arithmetic=2.500000 
Geometric=2.000000 
Harmonic=1.600000 
AGM=2.243029

cox $ a.out
This program computes various means of two given positive numbers
Please enter the value of x=0
Please enter the value of y=1
You entered: x=0.000000, y=1.000000
Invalid value of x or y. Both must be positive

cox $ a.out 0
This program computes various means of two given positive numbers
Please enter the value of x=1
Please enter the value of y=0
You entered: x=1.000000, y=0.000000
Invalid value of x or y. Both must be positive

cox $ a.out 1
This program computes various means of two given positive numbers
Please enter the value of x=2
Please enter the value of y=6
You entered: x=2.000000, y=6.000000
Arithmetic=4.000000

cox $ a.out 2
This program computes various means of two given positive numbers
Please enter the value of x=8.0
Please enter the value of y=2.0
You entered: x=8.000000, y=2.000000
Geometric=4.000000

cox $ a.out 3
This program computes various means of two given positive numbers
Please enter the value of x=0.25
Please enter the value of y=0.4
You entered: x=0.250000, y=0.400000
Harmonic=0.307692

cox $ a.out 4
This program computes various means of two given positive numbers
Please enter the value of x=2
Please enter the value of y=3
You entered: x=2.000000, y=3.000000
AGM=2.474680

cox $ a.out 5
This program computes various means of two given positive numbers
Invalid value of command line argument. Must be from 0 to 4.

cox $ a.out -1
This program computes various means of two given positive numbers
Invalid value of command line argument. Must be from 0 to 4.

cox $ a.out 0
This program computes various means of two given positive numbers
Please enter the value of x=2.0
Please enter the value of y=2.0E+7
You entered: x=2.000000, y=20000000.000000
^C

cox $ a.out 
This program computes various means of two given positive numbers
Please enter the value of x=2.0
Please enter the value of y=2.0E+6
You entered: x=2.000000, y=2000000.000000
Arithmetic=1000001.000000 
Geometric=2000.000000 
Harmonic=3.999996 
AGM=206659.187531

cox $ a.out 
This program computes various means of two given positive numbers
Please enter the value of x=2.0
Please enter the value of y=1.0E+7
You entered: x=2.000000, y=10000000.000000
Arithmetic=5000001.000000 
Geometric=4472.135955 
Harmonic=3.999999 
AGM=934372.516379

cox $ a.out
This program computes various means of two given positive numbers
Please enter the value of x=1.0E+7
Please enter the value of y=2.0
You entered: x=10000000.000000, y=2.000000
Arithmetic=5000001.000000
Geometric=4472.135955
Harmonic=3.999999
AGM=934372.516379

cox $ exit
Script done on Fri Nov 12 18:23:39 2004