program maxmin_5_keyin implicit none real max, min, temp integer i, num_total num_total = 5 write(*,*) 'Type in 5 numbers:' c Read in first data and set initial Min and Max value. read(*,*) temp max = temp min = temp do i=1, num_total - 1 read(*,*) temp if (temp.gt.max) max = temp if (temp.lt.min) min = temp end do write(*,*) 'The maximum value of the data set is :', max write(*,*) 'The minimum value of the data set is :', min end