0% found this document useful (0 votes)
11 views

Unit - 1 CP (Lecture 2)

Uploaded by

Neeraj Kumar
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views

Unit - 1 CP (Lecture 2)

Uploaded by

Neeraj Kumar
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 12

University Institute Of Computing

Bachelor of Computer Applications


Subject Name: Computer Programming
Code:20CAT111

1
Topics to be Covered
• Program development

• Problem solving techniques –:


1. Algorithm
2. Flowchart.

Fig. 2.1 Algorithm and flow chart [1]


2
Program Development
Generally, the program development life cycle contains 6 phases, they are as follows….
• Problem Definition
• Problem Analysis
• Algorithm Development
• Coding & Documentation
• Testing & Debugging
• Maintenance

Fig. 2.2 Steps followed in Program Development [1]


3
Algorithm
• To write a logical step-by-step method to solve the problem is called algorithm, in
other words, an algorithm is a procedure for solving problems.

• 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.

Symbol Purpose Description

Used to indicate the flow of logic by connecting


Flow line
symbols.

Terminal(Stop/Start) Used to represent start and end of flowchart.

Input/Output Used for input and output operation.

Processing Used for arithmetic operations and data-manipulations.

Table 1: Flow chart symbols


7
Flowchart Symbols Cont…
• The table describes all the symbols that are used in making flowchart.

Symbol Purpose Description

Used to represent the operation in which there are two


Decision
alternatives, true and false.

On-page Connector Used to join different flowline

Off-page Connector Used to connect flowchart portion on different page.

Predefined Used to represent a group of statements performing one


Process/Function processing task.

Table 1: Flow chart symbols


8
Flow Chart Example

Flow chart to calculate sum of two numbers

Fig. 2.3 – Flow Chart [3]


9
Reference Image Link
[1] https://techdifferences.com/wp-content/uploads/2018/10/intro-image.jpg
[2] http://zaiza.net/humhub-1.0.1/space/page/pseudo-code-add-two-numbers

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

• R1 Byron S. Gottfried, Programming with C, McGraw-Hill (2nd Edition)


• https://www.amazon.com/Schaums-Outline-Programming-Byron-Gottfried/dp/0070240353/ref
=sr_1_1?dchild=1&keywords=%E2%80%A2+Programming+with+C%2C+Gottfried%2C+a
nd+McGraw-Hill.&qid=1593001561&s=books&sr=1-1

• R2 Brian W. Kernighan, Dennis M. Ritchie, The ANSI C Programming Language, Prentice-


Hall 2nd Edition.
• http://www2.cs.uregina.ca/~hilder/cs833/Other%20Reference%20Materials/The%20C
%20Programming%20Language.pdf

11
THANK YOU
For queries
Email:[email protected]

You might also like