draw a flowchart and write a program and pseudocode that prompts the user for a starting balance and then prints the number of years it takes to reach 100000 and also number of years it takes to reach 1000000

To solve this problem, we can use a loop to calculate the number of years it takes to reach the desired amounts. Here's the pseudocode for the program:

```
1. Prompt the user for the starting balance
2. Set the balance equal to the starting balance
3. Set years100000 = 0 and years1000000 = 0

4. While balance < 100000:
a. Increase balance by 5% (balance = balance + balance * 0.05)
b. Increment years100000 by 1

5. While balance < 1000000:
a. Increase balance by 5% (balance = balance + balance * 0.05)
b. Increment years1000000 by 1

6. Print years100000 and years1000000
```

Now let's draw the flowchart for the program:

```
+--------------------+
| Start |
+--------------------+
|
|
v
+-------------------+
| Prompt starting |
| balance |
+-------------------+
|
|
v
+-------------------+
| Set balance to |
| starting balance |
+-------------------+
|
|
v
+-------------------+
| Set years100000 |
| and years1000000 |
| to 0 |
+-------------------+
|
|
v
+-------------------+
| While balance < |
| 100000 |
+------------|------+
|
|
v
+-------------------+
| Increase balance |
| by 5% |
+-------------------+
|
|
v
+-------------+
| Increment |
| years100000 |
+-------------+
|
|
v
+--------------|--------+
| While balance < 1000000|
+-----------------------+
|
|
v
+-------------------+
| Increase balance |
| by 5% |
+-------------------+
|
|
v
+-----------------+
| Increment |
| years1000000 |
+-----------------+
|
|
v
+--------------+
| Print |
| years100000 |
| and |
| years1000000 |
+--------------+
|
|
v
+-----------------+
| Stop |
+-----------------+
```

By following the flowchart and implementing the pseudocode in a programming language of your choice, you can create a program that prompts the user for a starting balance and prints the number of years it takes to reach 100,000 and 1,000,000.