Computers in Engineering WWW Site - Example 1.2

Example 1.2


FORTRAN Version

!
     PROGRAM P12
!
!
      IMPLICIT NONE
      PRINT *, 'This is Program >> P12  - Adds two numbers'
!
!     Simple program to add 2 numbers  
      PRINT *,2,3,2+3
      STOP
      END PROGRAM P12
OUTPUT:

              +--------------------------------------------------+
              |     32-bit Power for Lahey Computer Systems      |
              |   Phar Lap's 386|DOS-Extender(tm) Version 7.0    |
              |  Copyright (C) 1986-94 Phar Lap Software, Inc.   |
              |           Available Memory = 14880 Kb            |
              +--------------------------------------------------+


This is Program >> P12  - Adds two numbers
           2           3           5

Pascal Version

{
     Program to show simple addition
}
PROGRAM p12 (input, output);
BEGIN
  writeln (2+3)
END.

Last modified: 21/07/97