Fortran#
Installation#
Fortran90のコンパイラとしてGFortranをインストールする.
$ sudo apt-get install gfortran
Version#
$ gfortran --version
GNU Fortran (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Example#
hello.f90:
program hello
print *, "Hello, World!"
end program hello
$ gfortran hello.f90 -o hello
$ ./hello
Hello, World!