Introduction To Programming: High Level Language
Introduction To Programming: High Level Language
Introduction To Programming: High Level Language
H
m
c
p
r
t
i
/
v
e
w
o
l
u
g
n
a
INTRODUCTION TO PROGRAMMING
-
-
-
C= A+B
Print C
Programmer : a program is set of instruction ( STATEMENT) feed into computer to make it
perform a specific task
The program to perfume a task which could vary from drawing a picture , printing the result an
output screen or some of two numbers
The programming languages are written in English which a computer does not understand
A program Witten in English language in high level language that language converted into low
level language after converted the low level language the computer can understand.
Input A
Input B
into low level language with the help of complier or interpreter
High level language :
program’s written in
high level language
must be translated
Compiler: a compiler translates a entire program from high level into low level first then if
the program is error free , it is executed
Interpreter: it translates a program into low level language line by line , if the first line is
found to be error free in is converted into low level language the same process is repeated
for all the lines
3. TOTAL = M1=M2
Assembly language: before the invention of high level language, the programmers use to write
program’s in the assembly language .In assemble language, assembler is required the translate the
program in to low level language
E.g.:
Mov c1, 03
Add b1, c1
Mov d1, b1
Mov ah, 02
Int 21
Int 20
Algorithem
Step 1
A= value of x2
B= value of x
C = constant term
Step 2
∆ = b+b –4 *a *c
If ∆=0
Result –b /(2*a)
If ∆ <0
Types of Varibale
1. Numerical
2. Non numerical variables
Numerical
1. Integer
2. Real number
1. Charcter
2. Sting
The variable that store numeric data or numbers are called as numeric variable
Integers : are whole numbers it do not have fractional part eg. ( 0.99)
Characters: character variables can be stores any letter or special symbols $ sign @ sign etc. character is
enclosed in single codes Example ‘ a’
In a programmer have different complex tasks. That complex task can be dived into different modules
this is like that human beings do all the time. For eg : preparing a cup of tea.
Task 2 pour the hot water after boiling into the cup
Preparing a cup of tea is simple task , we broke it down into four steps
But even a simple programme can have thousands of statements , complex program, may have millions
of statements
One of the most important things a programmer needs to manage the complexity of a program,. This
can be done by modular approach methods
Module is a set of code that has been assign a name , just as a variable. These variable name used to
refrence tha data and excute the set of codes
Fuctions
Void add();
Int add();
Void main ()
Clrscer();
Printf( ‘ welcome”)
Getch(): ,