The attached program uses a random number generator, orders numbers hi to low, displays hi number, low number and should display mean and median numbers from random list. I run "./random2 1 100 20" to generate 20 numbers between 1 and 100, (./random2 min max number).
My attached program compiles using gcc -Wall -ansi -o random2 Assign2bm.c.
However, when I run "./random2 1 100 20" for example it seg faults after displaying largest number and smallest number without displaying mean and median.
Attachment:- Assign2bm.txt