Flow Chart
Pictorial representation of steps in the algorithm.
we will represent different steps of the algorithm using some standard symbols.
this is useful to understand the flow of execution of the program
>>>Flow chart symbols
Practice)
Draw Flow charts for previous programs Solution for Q1)
1. start your program
2. reserve memory space with name ‘a’
3. store value 12 into ‘a’
4. reserve another memory space with name ‘b’
5. store value 24 into ‘b’
6. reserve another memory space with name ‘sum’
7. add the values in a and b and store the result into ‘sum’
8. display the value in the ‘sum’ onto monitor
9. stop your program
pseudocode:
1. start
2. declare ‘a’
3. a:=12
4. declare ‘b’
5. b:=24
6. declare ‘sum’
7. sum:a+b
8. Write “sum=”,sum
9. stop
Output
activity that is used to display some information, response or result from program to the end-user
Input
activity that is used to collect data from end-user into program
1. start your program
2. reserve some amount of memory space in your RAM to store a number later and assign name ‘a’ to it
3. show a message to the user to ask him to enter a number
4. take number entered by the user and store into ‘a’
5. display the value stored in ‘a’ onto monitor
6. stop your program
1. start
2. declare ‘a’
3. write “enter a number”
4. read ‘a’
5. Write “value of a=”,a
6. stop
Ex)
Write your previous algorithms to get user input