Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- !gfortran, gcc version 5.4.0 20160609
- program numberThree
- real :: z, x, a
- x = 0.74
- a = 3
- z = equasion(x, a)**2 + 0.4 * equasion(x, a)
- print *, z
- end program numberThree
- function equasion(x, a)
- real :: equasion
- real :: x
- real :: a
- if (x < 1) then
- equasion = sqrt(-a * x + 2)
- else if(x >= 12) then
- equasion = log(x ** 2)
- else
- equasion = abs(sin(x ** 3))
- endif
- end function equasion
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement