! make_change.f90 ! ! print number of quarters, dimes, nickels, pennies ! that is your change ! ! 11/4/96 JSS initial version program make_change implicit none ! checkes for misspelled variables integer :: amount ! I like one per line for commenting integer :: status do print *, "Enter Amount from 1 to 99" read(*,*,iostat=status) amount if (status > 0) then ! warn user when bad data print *, "Bad data ignored" cycle end if if (status < 0) exit ! normal exit print *, amount ! sometimes nice to echo user data if (amount < 1 .or. amount > 99) then print *, "Amount is out of range" cycle end if ! ! your code goes here to print number of quarters, dimes, nickels, ! and pennies, but do not print any zero values. ! end do print *, "make_change finished" end program make_change