Do the planning and write algorithm to solve for following problem.



There are 15 pupils in the Introduction to Programming I module. The age of every student is entered in years and months. Convert the age into months to calculate the average age. Display the ans

To solve this problem, you'll need to perform the following steps:

1. Declare variables:
- count: to keep track of the number of pupils
- sumAge: to store the sum of ages in months
- averageAge: to store the calculated average age

2. Initialize the count and sumAge variables to 0.

3. Prompt the user to enter the age of each pupil in years and months.
- You can use a loop to iterate 15 times and ask for the age of each pupil.

4. For each pupil, convert the age into months and add it to the sumAge variable.
- To convert the age into months, multiply the number of years by 12 and add the number of months.

5. Increment the count variable by 1.

6. After the loop ends, calculate the average age by dividing the sumAge by the count.
- averageAge = sumAge / count

7. Display the average age to the user.

Here's an example algorithm in pseudocode:

```
Declare variables: count, sumAge, averageAge
Set count = 0, sumAge = 0

Loop 15 times:
Prompt the user to enter the age of a pupil in years and months
Convert the age into months
Add the converted age to sumAge
Increment count by 1

Calculate the average age:
Set averageAge = sumAge / count

Display averageAge
```

Keep in mind that this algorithm assumes valid input is provided (e.g., integer values for years and months). You may need to add error handling or validation checks for real-world implementation.