How to write a simple program in Fortran

As we know computer is a machine which have no mind. It does not understand our language. Computer have own language which converts our input data into its own language. For computer programming in Fortran language each line of the program is written in coding form which is known as Fortran coding form.
For writing a simple Fortran Program follow the following steps:
1) The first line starts with the letter C. This line is known as comment line. Uses of this line gives help to the readers to understand a program. A comment line does not affect the executable program in any way and may be used to provide documentation. This can be understand clearly as above discussed. It can be written in 2nd, 3rd line also.
2) After the comment line first Fortran statement is used which is READ statement. The Fortran statement must be written between columns 7 and 72. All embedded blanks statements are ignored in a Fortran statement. It is written as READ*, input-list.
3) Then other statements according to the program requirement.
4) PRINT statement as PRINT*, output- list as above mentioned.
5) STOP statement instruct the computer to terminate the execution of the program.
6) END statement is the last statement, It informs the compiler to end or finish the program.
Scroll to Top