Write an algorithm and flowchart for the condition "to calculate the area of a rectangle".
Answers
Answer: ALGORITHM
1. Algorithm & flowchart for adding two numbers.
Algorithm
Step-1: Start.
Step-2: Input two numbers in variable a & b.
Step-3: Calculate c = a+b.
Step-4: Print value of c.
Step-5: Stop.
Practice: Write an algorithm & flowchart for adding five integer numbers.
2. Algorithm & flowchart for subtracting two numbers.
Algorithm
Step-1: Start.
Step-2: Input two numbers in variable a & b.
Step-3: Calculate c = a-b.
Step-4: Print value of c.
Step-5: Stop.
3. Algorithm & flowchart for multiplying two numbers.
Algorithm
Step-1: Start.
Step-2: Input two numbers in variable a & b.
Step-3: Calculate c = a×b.
Step-4: Print value of c.
Step-5: Stop.
Practice: Write an algorithm & flowchart for multiplying five integer numbers.
FOR EXAMPLE :
Answer:
accept the length of rectangle say L
accept the breadth of rectangle say b
compute the perimeter with the help formula P=2 * (L + B)
Explanation: