- #1
ae62589
- 3
- 0
I am trying to input a txt file into my fortran program. My txt file is a 9x2 table of integers, all I want is to display the values in the same format in my program. I tried using,
program name
implicit none
integer :: input(9,2), I, J
open (unit=20, file="values.txt")
DO I = 1, 9
DO J = 1, 2
WRITE(*,*) input(I,J)
END DO
END DO
close (unit=20)
end program name
But when I run the program, it comes out with a bunch of random numbers. How can I get it to display my table just the way it is?
program name
implicit none
integer :: input(9,2), I, J
open (unit=20, file="values.txt")
DO I = 1, 9
DO J = 1, 2
WRITE(*,*) input(I,J)
END DO
END DO
close (unit=20)
end program name
But when I run the program, it comes out with a bunch of random numbers. How can I get it to display my table just the way it is?