All pastes #762741 Raw Edit

Dark3Lite

public text v1 · immutable
·published 2007-11-05 21:38 UTC
rendered paste body
The price of an item is p dollars. Due to the inflation, price of the item is expected to to increase by r% each year. For example, the price might be $79.50 and the inflation might be 7.5%. Write a program, which reads the values of p and r, and , starting with year 1, prints a table consisting of year and year-end price. The table ends when the year-end price is at least twice the original price.