How Can I Use Fortran Compiler? [Closed]
I'm New to Ubuntu and Don't Know Anything About Using the Command Line. 1 1 Answer If You Have the Code Below in the Text File Hello. F90 Program Hello Print...
I'm new to Ubuntu and don't know anything about using the command line.
If you have the code below in the text file hello.f90
Program Hello
Print *, "Hello World!"
End Program Hello
To compile the code, start the terminal and type:
gfortran -o hello hello.f90
To run the code, type
./hello
You need to have the compiler installed. If it is not installed type the following in the terminal:
sudo apt-get install gfortran
The hello.f90 file should be created in your home folder, e.g. using
gedit hello.f90&