program circle real r, area c This program reads a real number r and prints c the area of a circle with radius r. write (*,*) 'Give radius r:' read (*,*) r area = 3.14159*r*r write (*,*) 'Area = ', area stop end"c"·Î ½ÃÀÛÇÏ´Â ÁÙÀº ¼³¸í commentsÀ¸·Î »ç¶÷ÀÌ ÇÁ·Î±×·¥À» Á»´õ Àбâ ÁÁµµ·Ï Çϱâ À§ÇÑ °ÍÀÌ´Ù. ¿ø·¡ ¸ðµç Fortran ÇÁ·Î±×·¥Àº ´ë¹®ÀÚ·Î ½á¾ß¸¸ Çß¾ú´Ù. ¿äÁîÀ½Àº ´ëºÐÀÇ »ç¶÷ÀÌ Àбâ ÁÁ±â ¶§¹®¿¡ ¼Ò¹®ÀÚ¸¦ »ç¿ëÇϹǷΠ¿©±â¼µµ ±×·¸°Ô ÇÒ °ÍÀÌ´Ù.
program name declarations statements stop endÀ¸·Î ÀÌ·ç¾î Áø´Ù. ÀÌ tutorial¿¡¼ °æ»çü italics ´Ü¾î´Â ¹®ÀÚ ±×´ë·Î°¡ ¾Æ´Ï¶ó ÀϹÝÀû Ç¥ÇöÀ¸·Î °£ÁÖÇϵµ·Ï ÇÑ´Ù. stop ¹®Àº ¼±ÅÃÀûÀ¸·Î ÇÁ·Î±×·¥ÀÌ ÀÌ Á¡¿¡ µµÂøÇÏ¸é ¾î¶°ÇÑ °æ¿ì¿¡µµ Á¤ÁöÇÒ °ÍÀ̱⿡ ÇÊ¿ä¾ø¾î º¸ÀÌÁö¸¸, ÇÁ·Î±×·¥ÀÌ ÀÛ¾÷ÀÇ È帧ÀÌ ±× Á¡¿¡¼ Á¤ÁöÇÑ´Ù´Â °ÍÀ» °Á¶Çϱâ À§ÇÏ¿© ÇÁ·Î±×·¥Àº ¹Ýµå½Ã stop ¹®À¸·Î ³¡³ªµµ·Ï ÇÑ´Ù.
Col. 1 : ºó Ä ¶Ç´Â ¼³¸íÀÓÀ» ³ªÅ¸³»´Â "c" ³ª "*" Col. 2-5 : ¹®Àå label (optional) Col. 6 : ¾Õ ÁÙÀÇ ¿¬¼Ó (optional) Col. 7-72 : ¹®Àå Col. 73-80: ÀÏ·Ã ¹øÈ£ (optional, ¿äÁîÀ½Àº °ÅÀÇ »ç¿ëÇÏÁö ¾ÊÀ½)Fortran 77 ÇÁ·Î±×·¥ÀÇ ´ëºÎºÐÀÇ ÁÙÀº 6 °³ÀÇ ºóÄÀ¸·Î ½ÃÀÛÇÏ¿© 72 ¹ø° Ä ÀÌÀü¿¡ ³¡³ª¼ ¹®Àå ¿µ¿ª(statement field)¸¸ »ç¿ëÇÑ´Ù. ¹Ý¸é¿¡ Fortran 90Àº Çü½Ä¿¡ ±¸¾Ö¹ÞÁö ¾Ê´Â free-foramtÀÌ °¡´ÉÇÏ´Ù.
c23456789 (ÀÌ´Â ÄÀ» ³ªÅ¸³»±â À§ÇÑ °ÍÀÌ´Ù!) c The next statement goes over two physical lines area = 3.14159265358979 + * r * r"+" Ç¥½Ã ÀÌ¿Ü¿¡µµ ¾î¶°ÇÑ ¹®ÀÚ¸¦ »ç¿ëÇÏ¿©µµ »ó°ü ¾ø´Ù. ±×·¯³ª "+", "&", ¶Ç´Â ¼ýÀÚ(µÑ°ÁÙ¿¡´Â 2, ¼Â°ÁÙ¿¡´Â 3 µî)¸¦ »ç¿ëÇÏ´Â °ÍÀÌ ÁÁÀº ¹æ¹ýÀÌ´Ù.
c23456789 (This demonstrates column position!) programme cc integer int int = 12 write(*,*) 'The value of int is', + int end stop