OOPortal OOPortal

Structured Programming  «Prev  Next»
Lesson 1

Programming Fundamentals course map

Imperative paradigm

Is based on the ideas of a Von Neummann architecture. A command has a measurable effect on the program and the order of commands is important. Tasks are executed consecutively in a specified order. Its main characteristics are
  1. incremental change of the program state (variables) as a function of time;
  2. execution of commands in an order governed by control structures; and
  3. the use of procedures, abstractions of one or more actions,
which can be called as a single command.
Languages representatives of Imperative paradigm: Fortran, Algol, Basic, C, Pascal.

1 Program Example1 ;
3 Num1, Num2, Sum: Integer ;
5 Write ( ' Input number 1 : ' ) ;
Readln (Num1) ;
7 Write (' Input number 2 :' ) ;
Readln (Num2) ;
9 Sum := Num1 + Num2;
Writeln (Sum) ;
11 Readln ;