Pseudocode is a cross between human language and a programming language. Although
the computer can’t understand pseudocode, programmers often find it helpful to write an
algorithm in a language that’s “almost” a programming language, but still very similar
to natural language. For example, here is pseudocode that describes your homework
program:
Declare the variables
- A = amount of money
- N = number of years
- X = initial deposit
- R = interest rate
Ask the user for the number of years
Input the number of years
Ask the user for the initial deposit
Input the initial deposit
Ask the user for the interest rate.
Input the interest rate
Compute the amount of money (variable A) by using the formula A = X(1.0 + R/100)^N
Notice the pseudocode contains statements that look more like commands than the
English statements that describe the algorithm. The pseudocode even names variables and describes mathematical operations.
Also im not to sure how to use the formula they provided me with. Sorry again, and thanks for the help. |
Use the test data to practice.
For example:
A = 1000(1.0 + 0/100)^10
A = The answer of the formula.