Since this is a learning exercise, I wouldn't correct your code, but point out what needs to be fixed:
- Arrays in C are indexed from zero, not from one, so the counter should go from 0 to 4, inclusive
min
is anint
, whilenum
is an array, so the assignmentmin=num
is invalidscanf
should put the data into&num[count]
, not&num[5]
- In the way that you coded your loop you do not need an array at all: you need the last number entered.
total
cannot be computed asmin+max
; you need to keep a running total, updating it on each iteration.