View
247
Download
2
Tags:
Embed Size (px)
Citation preview
Introduction
A flowchart is a diagram consisting of labeled geometrical symbols together with rows connecting one symbol to another
A program flowchart pictures the sequence of instructions for solving a particular problem ( usually by means of a computer program).
Introduction The sequence of instructions for solving a particular problem is called algorithm.
Express the algorithm through a flowchart Easier to draw the flowchart than to write the program directly. Easier to understand than program Easy for development. Flowcharts are independent of any particular programming language
VARIABLES ,DATA-NAMES, PROGRAMMINGSATATEMENTS
a variable means a data item whose value may change during the execution of the program. Examples:-
Salary Bouns AVERAGE
Assignment Statements Salary = 500 Bouns = 0,03*Salary AVERAGE = ( T1+T2+T3)/3
FLOWCHART SYMBLOS
Example: A company plans to give a year-end 3% to each of its employees. However, if an employee has been working 10 or more years at the company , he is to get an additional $50.
FLOWCHART SYMBLOS
Example: The HP company plans to give a year-end 3% bonus to each of its employees earning $10,000 or more per year , and a fixed $300 bonus for the other employees.
ACCUMULATORS
Example : Suppose that a company wants to find the total salary paid to its employees of a company.
DO LOOPS
Example: A company has 80 employees . Draw a flowchart to find the average salary and the number of employees earning above the average salary