- #1
relianne
- 1
- 0
Hi all, I'm trying to create a program which allows the user to input two permutations of sizes <10 and then multiply two of these together.
I need some help on how to get two permutations to multiply each other in Fortran. A snippet of what I've written so far..
Thanks!
I need some help on how to get two permutations to multiply each other in Fortran. A snippet of what I've written so far..
Code:
Module Permutations
Implicit None
Integer:: I,n
Type Perm
Integer, Allocatable, Dimension (:) :: A
End Type
Type Perm :: A1
End Module Permutation
Program Permutations
Use Permutation
Implicit None
Print *, “Insert first permutation size”
Read *, n
Allocate (A1%A(1:n))
DO i=1,n
Print *, I, “maps to”
Read *, A1%A(i)
END DO
END Program Permutations
Last edited: