Home
(coming soon)
JAVA & C++
C# & Music
Cobol,Photos
ProgLangs
Art & Books
3D Art
Poems
Welcome to Simhadri's Software Company
ProgLangs



Here is COBOL, FORTRAN & PROLOG:

            Image


BASIC PROGRAMMING  LESSONS IN SOME
COMPUTER LANGUAGES:


All these programs ask the Fahrenheit and then convert it to Centigrade:

COBOL: (Common Business Oriented Language)

            IDENTIFICATION DIVISION
            PROGRAM-ID.EXAMPLE
            ENVIRONMENT DIVISION
            CONFIGURATION SECTION
            SOURCE-COMPUTER. IBM-370
            OBJECT-COMPUTER. IBM-370
            DATA DIVISION.
            WORKING-STORAGE SECTION
            77
            FAHR PICTURE 999
            77
            CENTI PICTURE 999.
            PROCEDURE DIVISION
            DISPLAY 'Enter Fahrenheit 'UPON CONSOLE.
            ACCEPT FAHR FROM CONSOLE.
            COMPUTE CENTI= (FAHR -32) * 5 / 9.
            DISPLAY 'Celsius  is' CENTI UPON CONSOLE.
            GOBACK.

LESSON 1:

NOTE:

DIVISION divide the computer

and SECTIONS demarcate the part of the program. 

1) DISPLAY in COBOL is output.

2) ACCEPT in COBOL is input.

3) COMPUTE is to calculate an expression.


FORTRAN: (Formula Translator)

a blend word derived from The IBM Mathematical Formula Translating System, developed in 1954 by IBM .

WRITE (6, *) ' ENTER FAHRENHEIT'
READ (5,*) XFAHR
XCENTI = (XFAHR-32) * 5/9
WRITE(6,*) ' Celsius is', XCENTI
STOP
END

NOTE:

1) WRITE in FORTRAN is output.

2) READ in FORTRAN is input.

3) The parameters inside the brackets are optional. The first selects the
standard output file, the second selects a default output layout ie. (6,*).

4) PROGRAM ENDS with STOP then next line END.

PROLOG: (Programming Logic)

convert: -write ( 'Enter Fahrenheit')'
read (Fahr)'
write('Celsius is ')'
centi is (5* (Fahr -32))/9'
write (centi),n1

NOTE: 1) Again 'write' in PROLOG, just like in FORTRAN is output.

2) 'read' in PROLOG just as in FORTRAN is input.

3) both 'write' and 'read' end with a '.

unless quoting a variable.

4) Opening statement starts with 'convert: - write'

            Image

Here are 20+ programs (written in source code) that our company sells:

  

 Choosing any program in the above pop-up menu,

 goes to the page where that particular product is illustrated.