Calculus Computer Lab
Math 190


News

Lab Schedule

QuickBasic Notes

Fortran Notes

Tutor Room

Winplot Manual

Lab Home

xxxxxxxxxxxxxxxxxx

c       This program demonstrates use of ".and." and ".or."
        program demo
        integer age
        print *, "What is your age ?"
        read *, age
        if (age .ge. 18 .and. age .le. 64) then              
                print *, "You can vote but you cannot retire."
        end if
        if (age .le. 12 .or. age .ge. 20) then
                print *, "You are not a teenager."
        else
                print *, "You are a teenager."
        end if
        print *, "Bye"
        end