An ordered set of instructions. It reads input, follows rules, and produces output.
Loading...
Loading...
Workspace
scientific computing numerical simulation and legacy HPC code
Definition first
Fortran is a programming language for writing exact instructions, often used for scientific computing numerical simulation and legacy HPC code. Start with one mental model: input goes through steps and becomes output.
main.f90Run gfortran main.f90 && ./a.outHabit Check array dimensions and numeric precision before optimizingAn ordered set of instructions. It reads input, follows rules, and produces output.
A value is data. A variable is the name you use to hold and reuse that data.
A named piece of work. It takes input, does one job, and can return a result.
gfortran is the place that actually runs code from main.f90.
First readable code
print *, 42
Output 42Language lineage
See where Fortran comes from, which languages feel close, and what to learn next.
Zero base path
Question bank
Pick a stage or search across the open programming bank. Jump straight to the matching drill.
Fortran question 1. Choose the statement that matches printing a value.
Fortran question 2. Choose the statement that matches naming a value.
Fortran question 3. Choose the statement that matches reusable function.
Fortran question 4. Choose the statement that matches basic collection.
Fortran question 5. Choose the statement that matches printing a value.
Fortran question 6. Choose the statement that matches naming a value.
Fortran question 7. Choose the statement that matches reusable function.
Fortran question 8. Choose the statement that matches basic collection.
Fortran question 9. Choose the statement that matches printing a value.
Fortran question 10. Choose the statement that matches naming a value.
Fortran question 11. Choose the statement that matches reusable function.
Fortran question 12. Choose the statement that matches basic collection.
Fortran question 13. Choose the statement that matches printing a value.
Fortran question 14. Choose the statement that matches naming a value.
Fortran question 15. Choose the statement that matches reusable function.
Fortran question 16. Choose the statement that matches basic collection.
Fortran question 17. Choose the statement that matches printing a value.
Fortran question 18. Choose the statement that matches naming a value.
Multiple choice
Fortran question 1. Choose the statement that matches printing a value.
print *, 42
Reference
gfortran main.f90 && ./a.outentry point output syntax print
print *, 42
variables assignment types integer
integer :: total total = 42 print *, total
function collection Array
integer function add(a, b) integer, intent(in) :: a, b add = a + b end function integer :: scores(2) = (/40, 2/) print *, size(scores)