fireball
27-11-2002, 20:51
------------- C -----------------------------
#include <stdio.h>
main()
{
int j,k,m;
printf("\n Input two integers:");
scanf("%d%d", &j, &k);
m=min(j,k);
printf("\n %d is the minimum of %d and %d\n\n",m,j,k);
}
------------------BASIC---------------------------
1740 REM********************
1750 REM Capture alarm data
1769 REM *******************
1770 CLS
1780 SCREEN 1
1790 COLOR BACK,PALL
1800 LOCATE 1,1
1810 INPUT "Alarm time: ",ATS
1820 AC$ = MID$(AT$,3,1)
1830 AH$ = MID$(AT$,1,2)
1840 AM$ = MID$(AT$,4,2)
1850 IF AC$ <> ":" GOTO 1770
.......
-----------------COBOL----------------------------
092900 B700-CONVERT-R80-DATE SECTION.
093000*
093100* IF CREDIT HAS NOT BEEN GIVEN ON A TRANSACTION,
093200* THE DATE USED IS THE TRANSACTION DATE. THIS
093300* SECTION CONVERT THE TRANSACTION DATE TO A
093400* NUMBER OF DAYS SINCE 1990, PUTTING THE RESULT IN
093500* WS-CALC-DATE.
.........
------------------------------------------------------
Programming and languages
Computer can deal with different kinds of problems if they are given the right instruction for what to do. Instructions are the first written in one of the hight level language, e.g FORTRAN, COBOL, ALGOL, PL/I, PASCAL, BASIC or C, depending on the type of problem to be solved. A program written in one of these languges is often called a source program, and it cannot be directly processed by the computer until it has been compiled., which means interpreted into machine code. Usually a single instruction written in a high-level language, when transformed into machine code, results in several instructions. Here is a brief description of some of the many high-level languages:
FORTRAN acronym for FORmula TRANslation. This language is used for solving scientific and mathematical problems. It consists of algebraic formula and English phrases. It was first instroduced in the United States in 1954.
COBOL acronym for COmmon Business-Oriented Language. This language is used for commercial purposes. COBOL, which is written using English statements, deal with problems that do not invove a lot of mathematical calculations. it was first instroduced in 1959.
ALGOL acronym for ALGOrithmic Language. Oringinally called IAL, which means International Algebraic Language. It is used for mathematical and scientific purposes. ALGOL was first instroduced in Europe in 1960.
PL/I Programming Language I. Developed in 1964 to combine features of COBOL and ALGOL. Consequently, it is used for data processing as well as scientific applications.
BASIC acronym for Beginner's All-purpose Symbolic Instruction Code. Developed in 1965 at Dartmouth College in the United States for use by students who require a simple language to begin programming.
C developed in the 1970's to support the UNIX operating system. C is a highly portable general-purpose laguage.
Other such languages are APL (developed in 1962), PASCAL (named after Blaise Pascal and developed in 1971), and LISP and PROLOG, both of which are used for work in artificial intelligence, LOGO is a development of LISP which has been used to developed computer-based training(CBT) packages.
:):):)
#include <stdio.h>
main()
{
int j,k,m;
printf("\n Input two integers:");
scanf("%d%d", &j, &k);
m=min(j,k);
printf("\n %d is the minimum of %d and %d\n\n",m,j,k);
}
------------------BASIC---------------------------
1740 REM********************
1750 REM Capture alarm data
1769 REM *******************
1770 CLS
1780 SCREEN 1
1790 COLOR BACK,PALL
1800 LOCATE 1,1
1810 INPUT "Alarm time: ",ATS
1820 AC$ = MID$(AT$,3,1)
1830 AH$ = MID$(AT$,1,2)
1840 AM$ = MID$(AT$,4,2)
1850 IF AC$ <> ":" GOTO 1770
.......
-----------------COBOL----------------------------
092900 B700-CONVERT-R80-DATE SECTION.
093000*
093100* IF CREDIT HAS NOT BEEN GIVEN ON A TRANSACTION,
093200* THE DATE USED IS THE TRANSACTION DATE. THIS
093300* SECTION CONVERT THE TRANSACTION DATE TO A
093400* NUMBER OF DAYS SINCE 1990, PUTTING THE RESULT IN
093500* WS-CALC-DATE.
.........
------------------------------------------------------
Programming and languages
Computer can deal with different kinds of problems if they are given the right instruction for what to do. Instructions are the first written in one of the hight level language, e.g FORTRAN, COBOL, ALGOL, PL/I, PASCAL, BASIC or C, depending on the type of problem to be solved. A program written in one of these languges is often called a source program, and it cannot be directly processed by the computer until it has been compiled., which means interpreted into machine code. Usually a single instruction written in a high-level language, when transformed into machine code, results in several instructions. Here is a brief description of some of the many high-level languages:
FORTRAN acronym for FORmula TRANslation. This language is used for solving scientific and mathematical problems. It consists of algebraic formula and English phrases. It was first instroduced in the United States in 1954.
COBOL acronym for COmmon Business-Oriented Language. This language is used for commercial purposes. COBOL, which is written using English statements, deal with problems that do not invove a lot of mathematical calculations. it was first instroduced in 1959.
ALGOL acronym for ALGOrithmic Language. Oringinally called IAL, which means International Algebraic Language. It is used for mathematical and scientific purposes. ALGOL was first instroduced in Europe in 1960.
PL/I Programming Language I. Developed in 1964 to combine features of COBOL and ALGOL. Consequently, it is used for data processing as well as scientific applications.
BASIC acronym for Beginner's All-purpose Symbolic Instruction Code. Developed in 1965 at Dartmouth College in the United States for use by students who require a simple language to begin programming.
C developed in the 1970's to support the UNIX operating system. C is a highly portable general-purpose laguage.
Other such languages are APL (developed in 1962), PASCAL (named after Blaise Pascal and developed in 1971), and LISP and PROLOG, both of which are used for work in artificial intelligence, LOGO is a development of LISP which has been used to developed computer-based training(CBT) packages.
:):):)