Write a program that calculates and displays the amount of money you would have if you invested $1,000 at 5 percent interest for one year.

double money = 1000;

double interest = 0.05;
for (int i = 0; i < 12; i++) {

}

double money = 1000;

double interest = 0.05;
for (int i = 0; i < 12; i++) {
money *= (1 + interest);
}
return money

To write a program that calculates and displays the amount of money you would have if you invested $1,000 at 5% interest for one year, you can use the following code in Python:

```python
principal = 1000 # initial amount invested
interest_rate = 0.05 # interest rate in decimal form
time = 1 # time in years

# calculate the amount after one year
amount = principal * (1 + interest_rate)

# round the amount to 2 decimal places
rounded_amount = round(amount, 2)

# print the result
print("After 1 year, the amount would be $" + str(rounded_amount))
```

Explanation of the code:

1. We initialize the variables `principal`, `interest_rate`, and `time` with their corresponding values. `principal` represents the initial amount invested, `interest_rate` is the interest rate in decimal form (5% = 0.05), and `time` represents the duration of investment in years.

2. We calculate the amount after one year by multiplying the principal amount by the sum of 1 and the interest rate.

3. We round the amount to 2 decimal places using the `round()` function.

4. Finally, we print the calculated amount by converting the `rounded_amount` to a string and concatenating it with the print statement.

Running this program will output the result: "After 1 year, the amount would be $1050.0".