Example: Basic math with variables
program total
REAL X,Y,Z
X = 2
Y= 5.5
Z = (X + Y) * 2
PRINT *,"Total = ", Z
end program total
Output:
Total = 15.0000000
program total
REAL X,Y,Z
X = 2
Y= 5.5
Z = (X + Y) * 2
PRINT *,"Total = ", Z
end program total
Output:
Total = 15.0000000