Simple Addition
Programming
This program demonstrates basic variable declaration, assignment, and arithmetic operations in Fortran.
Key Concepts
implicit none: Requires explicit declaration of all variablesinteger: Declares integer variables- Arithmetic operations:
+,-,*,/ print *: Outputs multiple values separated by spaces
Implementation
program simple_addition
implicit none
integer :: a, b, sum
a = 5
b = 10
sum = a + b
print *, "The sum of ", a, " and ", b, " is ", sum
end program simple_addition Output
The sum of 5 and 10 is 15