Hi,
I am new to Fortran. I would like to be able to construct and print a two-dimensional array. For example, I wrote the following code:
PROGRAM myarray
IMPLICIT NONE
INTEGER :: i, j, k
INTEGER, DIMENSION(3,4) :: a
k=1
DO i=1,3
DO j=1,4
a(i,j)=k
k=k+1
END DO...
Hi,
I would like to read an array from a text file. I have created a text file (which I called data.txt) containing the following text:
1 2 3 4
5 6 7 8
9 10 11 12
I would like to read this in as an array, "row-wise." I have created a Fortran 90 file (which I called myread2.f90) containing...
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.