Hello:
I am very very new to Fortran programming! I am trying to practice coding in Fortran language. I am using Plato IDE (FTN95). I have written a code for calculating factorial of a number. The file is attached!
I am asking the user to put in an integer 'n1', after which it will create an array variable containing n1 compartments. I am unsuccessful in compiling this. I keep getting the following error!
"C:\Users\mfg5310\Documents\factorial.F95(6) : error 542 - N appears in the dimension of a variable, yet is not a dummy argument, a variable available through USE or CONTAINS association, a COMMON variable, a PARAMETER, or a PURE FUNCTION
Compilation failed."
How can I fix this? I want the array dimension to be equal to the input number. For example, say I want to calculate 5! (5 factorial), I want the x array to be of 5 (row or column) element length. Somehow, I am unable to do that!
Please help me!
Thank you,
Mousumi Ghosh