Fortran: Lesson 4

Lesson topics


View Demos
# 1 # 2 # 3 # 4 # 5 # 6
Download Demos
# 1 # 2 # 3 # 4 # 5 # 6

Demo 6

								        program demo
c       This program demonstrates line continuation.
c       The "&" symbol, denoting continuation, goes in column 6.        
        real x, y
        print *, "Please enter a positive real number :"
        read *, x
                
        y = sin(x) + cos(x) + tan(x) + sinh(x) + cosh(x) + tanh(x)
     &      + exp(x) + log(x) + atan(x) + sqrt(x) 

        print *, "The sum of the 10 best Fortran functions at", x, " is"
        print *, y
        end