So I have a Ubuntu machine with gfortran installed in it.(adsbygoogle = window.adsbygoogle || []).push({});

I wrote the following simple code in fortran:

I saved it as 'calculation.f' file and then tried to compile it in the terminal, but got the following errors:Code (Fortran):

program calculation

print *, 55+55

end program calculation

Where did I go wrong here?Code (Text):

calculation.f:1:1:

program calculation

1

Error: Non-numeric character in statement label at (1)

calculation.f:1:1:

program calculation

1

Error: Unclassifiable statement at (1)

calculation.f:3:1:

end program calculation

1

Error: Non-numeric character in statement label at (1)

calculation.f:3:1:

end program calculation

1

Error: Unclassifiable statement at (1)

f951: Error: Unexpected end of file in ‘calculation.f’

Thanks.

**Physics Forums | Science Articles, Homework Help, Discussion**

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Fortran Teaching myself gfortran

Have something to add?

Draft saved
Draft deleted

Loading...

Similar Threads for Teaching myself gfortran |
---|

Which programming language would you want to teach to a very young person (5-7 y/o) |

**Physics Forums | Science Articles, Homework Help, Discussion**