write an algorithm , draw a flowchart and write a program to calculate the total amount if a child buys 20 pens at rs20each , 30 pencils at rs2 each and 40 erasers at rs5 -***********eac-h

Sure! Let's break down the problem into steps and create an algorithm, flowchart, and program to calculate the total amount.

Algorithm:
1. Declare variables:
- pens = 20
- pencils = 30
- erasers = 40
- penPrice = 20
- pencilPrice = 2
- eraserPrice = 5
- totalAmount = 0

2. Calculate the cost of pens: penCost = pens * penPrice
3. Calculate the cost of pencils: pencilCost = pencils * pencilPrice
4. Calculate the cost of erasers: eraserCost = erasers * eraserPrice
5. Calculate the total amount: totalAmount = penCost + pencilCost + eraserCost
6. Print the total amount.

Flowchart:
[Start] --> [Declare variables] --> [Calculate pen cost] --> [Calculate pencil cost] --> [Calculate eraser cost] --> [Calculate total amount] --> [Print total amount] --> [End]

Program (in Python):

```python
# Step 1: Declare variables
pens = 20
pencils = 30
erasers = 40
penPrice = 20
pencilPrice = 2
eraserPrice = 5
totalAmount = 0

# Step 2: Calculate the cost of pens
penCost = pens * penPrice

# Step 3: Calculate the cost of pencils
pencilCost = pencils * pencilPrice

# Step 4: Calculate the cost of erasers
eraserCost = erasers * eraserPrice

# Step 5: Calculate the total amount
totalAmount = penCost + pencilCost + eraserCost

# Step 6: Print the total amount
print("Total amount: Rs.", totalAmount)
```

This program will output the total amount for the given quantities of pens, pencils, and erasers.