Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- void value(void);
- void main ()
- {
- value();
- }
- void value(void)
- {
- float year = 1, period = 5, amount = 5000, inrate = 0.12;
- float sum;
- sum = amount;
- while (year <= period) {
- sum = sum * (1 + inrate);
- year = year + 1;
- }
- printf("The total amount is %f:", sum);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement