Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- PROGRAM EX7_50
- implicit none
- integer(4), parameter :: R_ = 4
- character(*), parameter :: input = "../data/input", output = "../data/output"
- integer(R_) :: in = 1, out = 2, N, i
- integer(R_), allocatable :: A(:,:), B(:,:)
- open(newunit = in, file = input)
- read(in,*) N
- allocate(A(N,N))
- read(in,*) (A(i,:), i = 1, N)
- close(in)
- write(*,*) A
- allocate(B(N,N-1))
- do concurrent (i = 1:N)
- B(i, i:N-1) = A(i, i+1:N)
- B(i, 1:i-1) = A(i, 1:i-1)
- end do
- write(*,*) (B(i,:), i = 1, N)
- end program
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement