Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- program random_matrix
- implicit none
- real,allocatable:: A(:,:)
- real r ! random value used to generate random size of the matrix
- real size ! real value to determinate randome numbers in the matrix
- real deg ! amount of rows and colums in the matrix
- integer i,j ! loop indexes
- ! call init_random_seed() would go here/ nie wiem, czy cos tu nie
- ! powinno byc a propo generowania bardziej losowego
- call random_number(r)
- deg = floor (r*20) ! ustalamy, ze maksymalny wymiar generowanej macierzy to 20x20
- write(*,*) deg
- size= deg*deg
- write(*,*) size
- call random_number(size)
- end program
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement