Yes I did I corrected the declaration portion. Then made sure the variables matched from the main program to the function and it now puts out a value. It is not correct so it is a math issue which I will hunt down. Thank you for the help it is greatly appreciated!!
So I declared n as an integer in the function and declared the h division to produce an actual value but it is still producing a 0 value.
Anymore advice?
This is what I have now...
Program test
IMPLICIT NONE
REAL :: Simpson13
INTEGER, DIMENSION(7) :: V
INTEGER :: h,n,simp13
V =...
So I made the changes but I am still having outputs of zero.
Anymore help?
This is what I have now...
Program test
IMPLICIT NONE
REAL :: Simpson13
INTEGER, DIMENSION(7) :: V
INTEGER :: h,n,simp13
V = (/1.000,1.167,1.333,1.500,1.667,1.833,2.000/)
h = 0.1667
n = 6.0
Simp13=Simpson13(V,h,n)...
I am very new to fortran and I have been assigned to write a Simpsons 1/3 function. Below is what I have come up with but it is outputting the area as 0. All help is greatly appreciated.
Program test
IMPLICIT NONE
REAL :: n, simp13, Simpson13
INTEGER, DIMENSION(10) :: V
INTEGER :: h
V =...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.