How To install GFortran ( Fortran Programming Language ) & Write a Hello World Program On Ubuntu 20.04

Click here for Govt Schemes

How To install GFortran ( Fortran Programming Language ) & Write a Hello World Program On Ubuntu 20.04

How To install GFortran ( Fortran Programming Language ) & Write a Hello World Program On Ubuntu 20.04
________________________________________________________________________________________

FORTRAN is a powerful programming language that is often over-shadowed by the more popular mainstream programming languages.

apt update ; apt-get install gfortran -y
gfortran --version
whereis gfortran ; which gfortran

Fortran Hello World Example: How To Write and Execute Fortran Program on Linux OS
nano helloworld.f
program hello
print *,"Hello World!"
end program hello


shorter Version  -
nano helloworld.f
PRINT *,"Hello World!"
END

Compile the Fortran program - gfortran -ffree-form helloworld.f
Execute the Fortran program (a.out) - ./a.out
mv a.out helloworld
./helloworld



Share on Pinterest
Share on LinkedIn
Share on WhatsApp
Share on Telegram



Latest POst

Recent Updates


Haryana Goverment Schemes