Input a polynomial into FORTRAN?

Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
2 replies · 4K views
danerape
Messages
31
Reaction score
0
Input a polynomial into FORTRAN?

Hello all, I took a Fortran programming class last semester and can write Fortran well. However, I never recall anyone ever asking if there would be a way to input a polynomial into the command prompt. I'm assuming there is not. It would be great though. I have written an entire diff and int program that can do logs,trig,exp,inverse, basically everything. I still have to chose what kind of diff/int, the degree and input each coefficient on its own. Would be nice to just enter a poly and hit enter.

THANKS
 
Physics news on Phys.org


It is not the solution you requested, but couldn't you just have the program open and read from a text file? It would save you the trouble of constantly entering the data one-at-a-time, possibly making typos, etc. That is what I do, especially during the debugging phase of writing a program.

Alternately, I did a Google search for

fortran read command line

and came up with many results. Perhaps there is something there that can help you.
 
Last edited: