Hello, I have a problem with a code. I would like to
read some files and set them to a variable in Fortran programming language. Ihave a file called
"number.txt" which has 2 lines and one column. I would like to set the numbers of first line to a variable called
x (real number) and the number of second variable to a variable called
z (real number too).
after all, I would like to calculate variable
y which is calculated from a spesific equation (I set the equation on my code trial).
Could you please help me?
What I have tried:
program test
implicit none
real x,z,y1,y2
open(7,file='numbers.txt',status='old')
open(8,file='results.txt',status='unknown')
y1=10
y2=x**2+z**2
close(1)
end program test