You are on page 1of 19

Programming

with C++
Vikram Kulkarni
MBA -Systems
C?

AB
Where is A & B

AB
A – Algorithm
B – Basics of
Programming
Then
C – The Programming
Algorithm
• Finite sequence of instructions.
• An explicit, step-by-step procedure
for solving a problem.
• Often used for calculation and data
processing.
Flowchart
A flowchart is a common type of
chart, that represents an algorithm
or process, showing the steps as
boxes of various kinds, and their
order by connecting these with
arrows. Flowcharts are used in
analyzing, designing, documenting or
managing a process or program in
various fields.
Flowcharts
Flowchart
Flowchart Elements

üSymbols
üConstants
üVariables
üExpressions and
Operators
Flowchart Symbols
• Start and end symbols Represented
as lozenges, ovals or rounded
rectangles, usually containing the
word "Start"
STARTor "End“ END/STOP

• An arrow coming from one symbol


and ending at another symbol
represents that control passes to the
START END/STOP
symbol the arrow points to.
Flowchart Symbols
• Processing steps Represented as
rectangles. X = Y + 2.45

• Input/Output Represented
GET Price
as a
parallelogram.

• Conditional or decision Represented


as a diamond (rhombus). These
typically contain aIf XYes/No
>Y question or
Flowchart Symbols
• Predefined Process is a process which
is already shown in another flowchart
(functions etc.) represented by
following sign.

• Document or Printout is shown by


Constants
The objects or the quantities
whose values cannot be changed in a
problem are termed as

CONSTANTS

e.g. z = 4x + 3y + 9
Constants are 4, 3 and 9
Variables
The objects or the quantities whose
values may change during execution in
a problem are termed as

VARIABLES

e.g. z = 4x + 3y + 9
Variables are z, x and y
Types of Variables
1. Integer variables – this type of
variables can assume any value
from the set of Integers
2. Real variables – value can be
anything from the set of Real
numbers.
3. String variables – non-numeric
variables, hold symbolic characters.
4. Logical variables - value can be
Any Questions
Lets work it out
Flowcharting Steps
1. Formulating the problem.
2. Deciding the input data.
3. Identifying the various computation
steps.
4. Identifying the decision points.
5. Knowing the expected results and
output.
Good

You might also like