Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- program random_matrix
- implicit none
- real, allocatable:: A(:,:) ! matrix for which the determinant is calculated
- integer n ! size of the matrix A nxn
- integer i,j ! loop indexes
- real r(1) ! random number
- ! Typing in the size of the matrix and amount of 0
- !**************************************************************************!
- write(*,*) 'amount of rows and colums'
- read(*,*) n
- allocate (A(n,n))
- ! Creating the matrix of random numbers
- !**************************************************************************!
- do i=1,n
- do j=1,n
- A(i,j)=floor(rand(r)*10.0)+1)
- enddo
- enddo
- write (*,*) A(i,j)
- end program
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement