
Fortran is one of the high-level programming languages, specifically designed for scientific resarch. Used in fields such as engineering, physics, and computational sciences.
Here’s a step-by-step guide to installing gfortran
on Ubuntu:
1-Update the Package List
open terminal(ctrl+T)
sudo apt-get update
2-Install gfortran
sudo apt-get install gfortran -y
3-Verify the Installation
gfortran –version
4-Write a Test Fortran Program
a-Create a new Fortran file named aiarbe.f90
nano aiarabe.f90
b-Add the following code to the file
program fortran1
print *, “Hello, my first program on fortran 90”
end program fortran1
c-Save the file and exit
-clrt+o(save)
-clrt+X(exit)
5-Compile the Fortran Code
gfortran aiarabe.f90 -o ai
6-Run the Program
./ai