Showing posts with label flowcharts. Show all posts
Showing posts with label flowcharts. Show all posts

Monday, September 2, 2013

FLOWCHARTS IN PROGRAMMING

WHAT ARE FLOWCHARTS ?

Flowcharts are graphical means of representing the logic to solve any computational problem.
It is a pictorial way and hence give more intense understanding of the solution for the problem at hand.It consist of some symbols which forms its tools to make a complete structure for any problem.

These symbols are : 
 
Flowchart Symbols


An example to show a perfect flowchart :


Flowchart to check whether a number is prime or not


Wednesday, August 28, 2013

TOPIC 2: LOGIC BUILDING USING PSEUDO CODE

2.1 Flowchart and Pseudo Code

Assignment 2.1.1: Problem Solving through flowchart

Problem Description: Draw a flowchart for the following problems:

1. Add first N even numbers

SOLUTION : 


flowchart to show addition of first 'n' even numbers


2.   Add first n odd numbers

SOLUTION :


Flowchart showing addition of first 'n' odd numbers


3.  Find maximum of three numbers

SOLUTION :


Flowchart showing maximum of three numbers


4. Determine whether a year s leap year or not

SOLUTION :


Flowchart showing whether a year is leap year or not

5. Input a number and check whether it is prime or not

SOLUTION :


Flowchart showing whether a number is prime or not


6. Input a number and check whether it can be expressed as some positive integer power of 2. For example 2,4,8,16,32… etc. can expressed as some positive integer power of 2 like 2^1,2^2,2^3,2^4, and 2^5……..

SOLUTION : 


Flowchart expressing a number as power of 2