mikibelavista
Technical User
- Jan 18, 2012
- 32
I have program like this
program comp
implicit none
integer :: i
real,dimension(17) :: a
real,dimension(29) :: b,c
open(10,file='01.txt',status='old')
open(11,file='frekvencije.dat',status='old')
read(10,*)a
read(11,*)b
do i=1,29
if (b(i)==a(1)) then
c(i)=i
end if
end do
write(*,*)c
end program
How to solve this,I want to compare b with a,but how to do this foe every a?
I have tried with WHERE but it did not work.
program comp
implicit none
integer :: i
real,dimension(17) :: a
real,dimension(29) :: b,c
open(10,file='01.txt',status='old')
open(11,file='frekvencije.dat',status='old')
read(10,*)a
read(11,*)b
do i=1,29
if (b(i)==a(1)) then
c(i)=i
end if
end do
write(*,*)c
end program
How to solve this,I want to compare b with a,but how to do this foe every a?
I have tried with WHERE but it did not work.