B.1 Types of Flowcharts: Saturday, 29 August 2020 1:13 PM
B.1 Types of Flowcharts: Saturday, 29 August 2020 1:13 PM
B.1 Types of Flowcharts: Saturday, 29 August 2020 1:13 PM
A. Flow Charts
Advantages
• Communication – it is better way of communicating the logic of a program solution.
• Effect analysis – with the help of flow charts problem can be analyze in a effective way
• Effective coding – flow charts acts as a blue print during the system analysis iv. Proper debugging – flow chart helps in
debugging process.
Limitations
• Alterations and modifications: If alterations are required, the flowchart may require re -drawing completely.
2. Program flow charts: Program flow charts are used by programmers. It is used to describe the sequence of
operations and decisions for a particular problem. Generally to solve any of the programs belonging to C, C++, Java. .
etc., program flow charts are used.
3. Assignment operator The result of arithmetic operation is stored in a variable. This is represented as below. This is
illustrated in example 1.10
Examples:
2. Draw a flowchart that will compute and print the area of the circle assuming that the radius is equal to 5.
3. Draw a flowchart that will read two integers. Compute and print the sum and product of these numbers.
5. A Class has four exams. Draw a flowchart that will read in the value of the four exams and output the student’s
average.
Write an algorithm and draw the flowchart for each of the following:
1. Draw a flowchart that will compute for the perimeter of the circle. Given the formula
P = 2*pi*R
Where P is the perimeter, r is the radius.
2. An Auto mobile starts from rest then runs at a speed of a km/hr. Draw a flowchart that will compute for the total
distance traveled if the automobile had been traveling for t hours. Use the formula d=v0t + (at2)/2
4. Draw a flowchart that will accept three numbers and determines which is the highest and which is the lowest.
5. Draw a flowchart that will compute and print for the price of ice given the following conditions
Temperature Price(pesos)
35-37 5
31-34 4
27-30 3
24-26 2
23 and below 0
2. Decision (if..then..else)
Part of the flowchart that employs two or more possible alternative solution and one of which will be chosen for
execution depending on the value of the given condition.
Example:
In a Repeat...Until loop, the process is executed first then the condition is tested. If the value of the condition returns
Designing a Loop
There are three things to consider in designing a loop:
1. The body
2. The initializing statement
3. The conditions for terminating a loop