PCI Unit 1.1 Algorithms 1
PCI Unit 1.1 Algorithms 1
Faculty:
Mr. A. A. Patel Khan
Dept. of Computer Technology
K. K. Wagh Polytechnic, Nashik
Unit-I Program Logic Development
Topic: Algorithms
1 . Assignments
1 • Input
2. Calculations
2 • Processing 3. Decision Making
3 • Output 4. Repetitions/Loop
Algorithm:
Step-1: Start
Step-2: Accept length & breadth of rectangle
Step-3: Find Area= length * breadth
Step-4: Print Area
Step-5: Find perimeter = 2 * (length + breadth)
Step-6: Display perimeter
Step-7:Stop
Unit-I Program Logic Development
Assignment on Algorithm (Input-Output)
1. Write an Algorithm to find area and circumference of a circle
Area = Pi *r * r, circumference = 2*pi*r
2. Write an Algorithm to calculate simple interest for the
principle amount deposited in a bank for n-No. of years
with specified rate of interest
SI = (P * N * R ) / 100
P- Principle amount
N- No. of years
R- Rate of interest
SI- Simple Interest
Algorithm:
Step-1: Start
Step-2: Read no1 & no2 as two numbers
Step-3: If (no1 > no2)
-then Print no1 as greater
-else Print no2 as greater
Step-4: Stop