I’m currently learning FORTRAN 95 with Sun Studio (as a hobby) and I’m trying to learn the basics from online tutorials before I buy any books.
Anyone here with any decent knowledge of F95 to help me with a little programming?
I can’t get this to work:
program age
implicit none
integer :: a
print*,'Please type in your age '
read (*,*) a
print*,'Your age is ', a
if (a.lt.0) then
print*,'Your age cannot be negative!'
end if
end program age
It’s really basic I know, I only just started yesterday and I managed to get a few small programs up and running. But I don’t know what I did wrong here, and the debugger doesn’t seem to give me any clues on this