Unit - 1 CP (Lecture 2)
Unit - 1 CP (Lecture 2)
1
Topics to be Covered
• Program development
• In order to solve a mathematical or computer problem, this is the first step of the
procedure.
• Algorithms can be presented by natural languages, pseudo code and flowcharts, etc.
4
Algorithm Example
Write an algorithm to add two numbers entered by the user.
• Step 1: Start
• Step 2: Declare variables num1, num2 and sum.
• Step 3: Read values num1 and num2.
• Step 4: Add num1 and num2 and assign the result to sum.
sum←num1+num2
• Step 5: Display sum
• Step 6: Stop
5
Flowchart
• Flowchart is a diagrammatic representation of an algorithm.
• Flowchart are very helpful in writing program and explaining program to others.
• Different symbols are used for different states in flowchart, For example:
Input/output and decision making has different symbols.
6
Flowchart Symbols Cont…
• The table describes all the symbols that are used in making flowchart.
10
Reference Books
• T1 E. Balaguruswamy, Programming in ANSI, McGraw-Hill Education,
• https://bookmart.online/shop/programming-in-ansi-c-8-e-balagurusamy-second-hand-book/?ut
m_source=Google%20Shopping&utm_campaign=test&utm_medium=cpc&utm_term=498
11
THANK YOU
For queries
Email:[email protected]