# Difference: Lab2 (1 vs. 19)

#### Revision 192018-01-16 - JimSkon

Line: 1 to 1

 META TOPICPARENT name="WebHome"

# Lab 2 - Roman Numerals

Changed:
<
<

>
>

### Due: Feb 15, 11:55pm

Changed:
<
<
Moodle Link  >
>
Moodle Link  ### For each problem Turn in

• The code (as a cpp file),

#### Revision 182017-09-22 - JimSkon

Line: 1 to 1

 META TOPICPARENT name="WebHome"

# Lab 2 - Roman Numerals

Changed:
<
<

>
>

### Due: Sept 21, 11:55pm

Changed:
<
<
Moodle Link  >
>
Moodle Link  ### For each problem Turn in

• The code (as a cpp file),

#### Revision 172017-02-14 - JimSkon

Line: 1 to 1

 META TOPICPARENT name="WebHome"

# Lab 2 - Roman Numerals

Line: 114 to 114
21 425.00 420.96 4.04 629.72 204.72 22 206.04 204.72 1.32 631.04 0.00 Payoff in 22 months (1.83) years
Changed:
<
<
The annualized interest is: \$344.20 a year, or 4.05% a year
>
>

#### Revision 162017-02-08 - JimSkon

Line: 1 to 1

 META TOPICPARENT name="WebHome"

# Lab 2 - Roman Numerals

Line: 11 to 11

• A file with the collected outputs from the trial inputs below the run outputs as requested below.
###### Coding Requirements:
1. Follow follow the guidelines on Program Style described in section 2.5 of the textbook. ( See guidelines here).
Changed:
<
<
>
>
###### Problem 1
Write a program that accepts a year written as a four-digit Arabic (ordinary) numeral and outputs the year written in Roman numerals. Important Roman numerals are V for 5, X for 10, L for 50, C for 100, D for 500, and M for 1,000. Recall that some numbers are formed by using a kind of subtraction of one Roman digit; for example, IV is 4 produced as V minus I, XL is 40, CM is 900, and so on. A few sample years: MCM is 1900, MCML is 1950, MCMLX is 1960, MCMXL is 1940, MCMLXXXIX is 1989. Assume the year is between 1000 and 3000. Your program should include a loop that lets the user repeat this calculation until the user says she or he is done.
Line: 52 to 52
Interest on a loan is paid on a declining balance, and hence a loan with an interest rate of, say, 14% can cost significantly less than 14% of the balance. Write a program that takes a loan amount and interest rate as input and then outputs the monthly payments and balance of the loan until the loan is paid off. Assume that the monthly payments are one-twentieth (1/20th) of the original loan amount, and that any amount in excess of the interest is credited toward decreasing the balance due. Thus, on a loan of \$20,000, the payments would be \$1,000 a month. If the interest rate is 10%, then each month the interest is one-twelfth of 10% of the remaining balance. The first month, (10% of \$20,000)/12, or \$166.67, would be paid in interest, and the remaining \$833.33 would decrease the balance to \$19,166.67. The following month the interest would be (10% of \$19,166.67)/12, and so forth. Also have the program output the total interest paid over the life of the loan.

For each input, please print out a full amortization table as seen in the example below. Your program should ask for a loan amount, and an interest percentage. The output should be in fixed number format with 2 digit after the decimal point.

>
>
You can use the tab character to help line up the output. If you cout a "/t" the output will tab over.

###### Turn in runs with the following inputs:
1. Loan: \$10,000, Interest: 5.5%
2. Loan: \$4,500, Interest: 13.35%

#### Revision 152017-01-17 - JimSkon

Line: 1 to 1

 META TOPICPARENT name="WebHome"
Changed:
<
<

>
>

# Lab 2 - Roman Numerals

### Due: Feb 14, 11:55pm

Changed:
<
<
Moodle Link >
>
Moodle Link  ### For each problem Turn in

• The code (as a cpp file),
• A file with the collected outputs from the trial inputs below the run outputs as requested below.
Line: 125 to 127

 All source code (.cpp) 10 Total 100
Solution \ No newline at end of file
>
>
• Roman.gif:

 META FILEATTACHMENT attachment="Roman.gif" attr="" comment="" date="1484622151" name="Roman.gif" path="Roman.gif" size="28811" user="JimSkon" version="1"

#### Revision 142016-09-20 - JimSkon

Line: 1 to 1

 META TOPICPARENT name="WebHome"

# Lab 2

### Due: Sept 22, 11:55pm

Line: 47 to 47

1. A year that is too large

### Problem 2

Changed:
<
<
Interest on a loan is paid on a declining balance, and hence a loan with an interest rate of, say, 14% can cost significantly less than 14% of the balance. Write a program that takes a loan amount and interest rate as input and then outputs the monthly payments and balance of the loan until the loan is paid off. Assume that the monthly payments are one-twentieth of the original loan amount, and that any amount in excess of the interest is credited toward decreasing the balance due. Thus, on a loan of \$20,000, the payments would be \$1,000 a month. If the interest rate is 10%, then each month the interest is one-twelfth of 10% of the remaining balance. The first month, (10% of \$20,000)/12, or \$166.67, would be paid in interest, and the remaining \$833.33 would decrease the balance to \$19,166.67. The following month the interest would be (10% of \$19,166.67)/12, and so forth. Also have the program output the total interest paid over the life of the loan.
>
>
Interest on a loan is paid on a declining balance, and hence a loan with an interest rate of, say, 14% can cost significantly less than 14% of the balance. Write a program that takes a loan amount and interest rate as input and then outputs the monthly payments and balance of the loan until the loan is paid off. Assume that the monthly payments are one-twentieth (1/20th) of the original loan amount, and that any amount in excess of the interest is credited toward decreasing the balance due. Thus, on a loan of \$20,000, the payments would be \$1,000 a month. If the interest rate is 10%, then each month the interest is one-twelfth of 10% of the remaining balance. The first month, (10% of \$20,000)/12, or \$166.67, would be paid in interest, and the remaining \$833.33 would decrease the balance to \$19,166.67. The following month the interest would be (10% of \$19,166.67)/12, and so forth. Also have the program output the total interest paid over the life of the loan.
For each input, please print out a full amortization table as seen in the example below. Your program should ask for a loan amount, and an interest percentage. The output should be in fixed number format with 2 digit after the decimal point.

#### Revision 132016-09-20 - JimSkon

Line: 1 to 1

 META TOPICPARENT name="WebHome"

# Lab 2

Changed:
<
<

>
>

### Due: Sept 22, 11:55pm

Moodle Link ### For each problem Turn in

#### Revision 122016-09-19 - JimSkon

Line: 1 to 1

 META TOPICPARENT name="WebHome"

# Lab 2

Changed:
<
<

>
>

### For each problem Turn in

• The code (as a cpp file),
• A file with the collected outputs from the trial inputs below the run outputs as requested below.
Changed:
<
<

### Coding Requirements:

>
>
###### Coding Requirements:

1. Follow follow the guidelines on Program Style described in section 2.5 of the textbook. ( See guidelines here).
Changed:
<
<

Feature %
Program correctness and completeness with respect to defination 70%
Code Format (Indenting, variable names) 10%
Turning in complete runs as requested 10%

### Problem 1

>
>
###### Problem 1
Write a program that accepts a year written as a four-digit Arabic (ordinary) numeral and outputs the year written in Roman numerals. Important Roman numerals are V for 5, X for 10, L for 50, C for 100, D for 500, and M for 1,000. Recall that some numbers are formed by using a kind of subtraction of one Roman digit; for example, IV is 4 produced as V minus I, XL is 40, CM is 900, and so on. A few sample years: MCM is 1900, MCML is 1950, MCMLX is 1960, MCMXL is 1940, MCMLXXXIX is 1989. Assume the year is between 1000 and 3000. Your program should include a loop that lets the user repeat this calculation until the user says she or he is done.

Your program should give an appropriate error if the input is not a valid four-digit year between 1000 and 3000.

>
>
###### Below is a sample run:
```  Conversion of Arabic Number to Roman Number Format
Enter ARABIC YEAR NUMBER between 1000 and 3000 you want to convert: 1957

In Roman Numeral Format:  MCMLVII

Try Again?[y/n]: y
Enter ARABIC YEAR NUMBER between 1000 and 3000 you want to convert: 2016

In Roman Numeral Format:  MMXVI

```

Changed:
<
<
Turn in runs for:
>
>
Try Again?[y/n]: y Enter ARABIC YEAR NUMBER between 1000 and 3000 you want to convert: 265 Number should be between 1000 and 3000

Try Again?[y/n]: y Enter ARABIC YEAR NUMBER between 1000 and 3000 you want to convert: 1245

In Roman Numeral Format: MCCXLV

Try Again?[y/n]: n Thank You!

###### Turn in runs for the following input:

1. 1650
2. 2033
3. 1999
Line: 36 to 50
Interest on a loan is paid on a declining balance, and hence a loan with an interest rate of, say, 14% can cost significantly less than 14% of the balance. Write a program that takes a loan amount and interest rate as input and then outputs the monthly payments and balance of the loan until the loan is paid off. Assume that the monthly payments are one-twentieth of the original loan amount, and that any amount in excess of the interest is credited toward decreasing the balance due. Thus, on a loan of \$20,000, the payments would be \$1,000 a month. If the interest rate is 10%, then each month the interest is one-twelfth of 10% of the remaining balance. The first month, (10% of \$20,000)/12, or \$166.67, would be paid in interest, and the remaining \$833.33 would decrease the balance to \$19,166.67. The following month the interest would be (10% of \$19,166.67)/12, and so forth. Also have the program output the total interest paid over the life of the loan.

For each input, please print out a full amortization table as seen in the example below. Your program should ask for a loan amount, and an interest percentage. The output should be in fixed number format with 2 digit after the decimal point.

Changed:
<
<
Turn in runs with the following inputs:
>
>
###### Turn in runs with the following inputs:

1. Loan: \$10,000, Interest: 5.5%
2. Loan: \$4,500, Interest: 13.35%
3. Loan: \$120,000, Interest: 3.55%
Changed:
<
<
Two sample runs are given below:
>
>
###### Two sample runs are given below:

```A \$20000.00 loan at 10.00% interest.

#   PAYMENT      PRINCIPAL   INTEREST   TOTAL INTEREST   BALANCE

```

#### Revision 112016-09-19 - JimSkon

Line: 1 to 1

 META TOPICPARENT name="WebHome"

# Lab 2

### Due: Sept 20, 11:55pm

Line: 41 to 41

1. Loan: \$10,000, Interest: 5.5%
2. Loan: \$4,500, Interest: 13.35%
3. Loan: \$120,000, Interest: 3.55%
>
>
Two sample runs are given below:

```A \$20000.00 loan at 10.00% interest.

#   PAYMENT      PRINCIPAL   INTEREST   TOTAL INTEREST   BALANCE

```
Line: 68 to 70
22 969.74 961.73 8.01 1969.74 0.00 Payoff in 22 months (1.83) years
>
>
Amount Loaned: 8500 Interest Rate: .0775 A \$8500.00 loan at 7.75% interest.

# PAYMENT PRINCIPAL INTEREST TOTAL INTEREST BALANCE 1 425.00 370.10 54.90 54.90 8129.90 2 425.00 372.49 52.51 107.40 7757.40 3 425.00 374.90 50.10 157.50 7382.50 4 425.00 377.32 47.68 205.18 7005.18 5 425.00 379.76 45.24 250.42 6625.42 6 425.00 382.21 42.79 293.21 6243.21 7 425.00 384.68 40.32 333.53 5858.53 8 425.00 387.16 37.84 371.37 5471.37 9 425.00 389.66 35.34 406.70 5081.70 10 425.00 392.18 32.82 439.52 4689.52 11 425.00 394.71 30.29 469.81 4294.81 12 425.00 397.26 27.74 497.55 3897.55 13 425.00 399.83 25.17 522.72 3497.72 14 425.00 402.41 22.59 545.31 3095.31 15 425.00 405.01 19.99 565.30 2690.30 16 425.00 407.63 17.37 582.67 2282.67 17 425.00 410.26 14.74 597.42 1872.42 18 425.00 412.91 12.09 609.51 1459.51 19 425.00 415.57 9.43 618.93 1043.93 20 425.00 418.26 6.74 625.68 625.68 21 425.00 420.96 4.04 629.72 204.72 22 206.04 204.72 1.32 631.04 0.00 Payoff in 22 months (1.83) years The annualized interest is: \$344.20 a year, or 4.05% a year

#### Revision 102016-09-06 - JimSkon

Line: 1 to 1

 META TOPICPARENT name="WebHome"

# Lab 2

Deleted:
<
<

### Instructions

Changed:
<
<
• Turn in the code (a cpp file or ideone.com link) for each, and the run outputs as requested below.
• Remember to format the code as described and the book and text, and to include comments including complete comment the beginning of the program.
```//File Name: health.cpp
//Assignment Number: 2
//Description: Program to determine if the user is ill.
//Last Changed: September 23, 2015
```
>
>
Moodle Link ### Turn in

• The code (as a cpp file),
• A file with the collected outputs from the trial inputs below the run outputs as requested below.

### Coding Requirements:

1. Follow follow the guidelines on Program Style described in section 2.5 of the textbook. ( See guidelines here).

Line: 38 to 35
Interest on a loan is paid on a declining balance, and hence a loan with an interest rate of, say, 14% can cost significantly less than 14% of the balance. Write a program that takes a loan amount and interest rate as input and then outputs the monthly payments and balance of the loan until the loan is paid off. Assume that the monthly payments are one-twentieth of the original loan amount, and that any amount in excess of the interest is credited toward decreasing the balance due. Thus, on a loan of \$20,000, the payments would be \$1,000 a month. If the interest rate is 10%, then each month the interest is one-twelfth of 10% of the remaining balance. The first month, (10% of \$20,000)/12, or \$166.67, would be paid in interest, and the remaining \$833.33 would decrease the balance to \$19,166.67. The following month the interest would be (10% of \$19,166.67)/12, and so forth. Also have the program output the total interest paid over the life of the loan.
Changed:
<
<
For each input, please print out a full amortization table as seen in the example below. Your program should ask for a loan amount, and an interest percentage. The output should be in fixed number format with 2 digit after the decimal point.
>
>
For each input, please print out a full amortization table as seen in the example below. Your program should ask for a loan amount, and an interest percentage. The output should be in fixed number format with 2 digit after the decimal point.
Turn in runs with the following inputs:
1. Loan: \$10,000, Interest: 5.5%
Line: 73 to 70

Deleted:
<
<
Solution
\ No newline at end of file
>
>

Problem 1 Run examples with correct output on required trial data   35
Problem 1 Good clean, easy to understand Input and output operations   5
Problem 1 Complete source code with good formatting, variables names, and comments   5
Problem 2 Run examples with correct output on required trial data   35
Problem 2 Good clean, easy to understand Input and output operations   5
Problem 2 Complete source code with good formatting, variables names, and comments   5
All source code (.cpp)   10
Total   100
Solution

#### Revision 92016-08-24 - JimSkon

Line: 1 to 1

 META TOPICPARENT name="WebHome"

# Lab 2

Changed:
<
<

>
>

### Instructions

• Turn in the code (a cpp file or ideone.com link) for each, and the run outputs as requested below.
• Remember to format the code as described and the book and text, and to include comments including complete comment the beginning of the program.
Changed:
<
<
```//File Name: health.cpp

```
>
>
```//File Name: health.cpp

```
Line: 25 to 23

 Turning in complete runs as requested 10%

### Problem 1

Changed:
<
<
Write a program that accepts a year written as a four-digit Arabic (ordinary) numeral and outputs the year written in Roman numerals. Important Roman numerals are V for 5, X for 10, L for 50, C for 100, D for 500, and M for 1,000. Recall that some numbers are formed by using a kind of subtraction of one Roman “digit”; for example, IV is 4 produced as V minus I, XL is 40, CM is 900, and so on. A few sample years: MCM is 1900, MCML is 1950, MCMLX is 1960, MCMXL is 1940, MCMLXXXIX is 1989. Assume the year is between 1000 and 3000. Your program should include a loop that lets the user repeat this calculation until the user says she or he is done.
>
>
Write a program that accepts a year written as a four-digit Arabic (ordinary) numeral and outputs the year written in Roman numerals. Important Roman numerals are V for 5, X for 10, L for 50, C for 100, D for 500, and M for 1,000. Recall that some numbers are formed by using a kind of subtraction of one Roman digit; for example, IV is 4 produced as V minus I, XL is 40, CM is 900, and so on. A few sample years: MCM is 1900, MCML is 1950, MCMLX is 1960, MCMXL is 1940, MCMLXXXIX is 1989. Assume the year is between 1000 and 3000. Your program should include a loop that lets the user repeat this calculation until the user says she or he is done.
Your program should give an appropriate error if the input is not a valid four-digit year between 1000 and 3000.

#### Revision 82015-09-28 - JimSkon

Line: 1 to 1

 META TOPICPARENT name="WebHome"

# Lab 2

### Instructions

• Turn in the code (a cpp file or ideone.com link) for each, and the run outputs as requested below.
Changed:
<
<
• Remember to format the code as described and the book and text, and to include comments including complete commetns at the beginning of the program.
>
>
• Remember to format the code as described and the book and text, and to include comments including complete comment the beginning of the program.

```//File Name: health.cpp
//Assignment Number: 2
//Description: Program to determine if the user is ill.
//Last Changed: September 23, 2015
```

Feature %
Line: 30 to 40
Interest on a loan is paid on a declining balance, and hence a loan with an interest rate of, say, 14% can cost significantly less than 14% of the balance. Write a program that takes a loan amount and interest rate as input and then outputs the monthly payments and balance of the loan until the loan is paid off. Assume that the monthly payments are one-twentieth of the original loan amount, and that any amount in excess of the interest is credited toward decreasing the balance due. Thus, on a loan of \$20,000, the payments would be \$1,000 a month. If the interest rate is 10%, then each month the interest is one-twelfth of 10% of the remaining balance. The first month, (10% of \$20,000)/12, or \$166.67, would be paid in interest, and the remaining \$833.33 would decrease the balance to \$19,166.67. The following month the interest would be (10% of \$19,166.67)/12, and so forth. Also have the program output the total interest paid over the life of the loan.
Changed:
<
<
Your program should ask for a loan amount, and an interest percentage. The output should be in fixed number format with 2 digit after the decimal point.
>
>
For each input, please print out a full amortization table as seen in the example below. Your program should ask for a loan amount, and an interest percentage. The output should be in fixed number format with 2 digit after the decimal point.
Turn in runs with the following inputs:
1. Loan: \$10,000, Interest: 5.5%

#### Revision 72015-09-22 - JimSkon

Line: 1 to 1

 META TOPICPARENT name="WebHome"

# Lab 2

### Due: Sept 22, 11:55pm

Line: 30 to 30
Interest on a loan is paid on a declining balance, and hence a loan with an interest rate of, say, 14% can cost significantly less than 14% of the balance. Write a program that takes a loan amount and interest rate as input and then outputs the monthly payments and balance of the loan until the loan is paid off. Assume that the monthly payments are one-twentieth of the original loan amount, and that any amount in excess of the interest is credited toward decreasing the balance due. Thus, on a loan of \$20,000, the payments would be \$1,000 a month. If the interest rate is 10%, then each month the interest is one-twelfth of 10% of the remaining balance. The first month, (10% of \$20,000)/12, or \$166.67, would be paid in interest, and the remaining \$833.33 would decrease the balance to \$19,166.67. The following month the interest would be (10% of \$19,166.67)/12, and so forth. Also have the program output the total interest paid over the life of the loan.
Changed:
<
<
Finally, determine what simple annualized percentage of the original loan balance was paid in interest. For example, if \$1,000 was paid in interest on a \$10,000 loan and it took two years to pay off, then the annualized interest is \$500, which is 5% of the \$10,000 loan amount. Your program should allow the user to repeat this calculation as often as desired.

Your program should ask for a loan amount, and an interest percentage. The output should be in fixed number format with 2 digit after the decimal point.

>
>
Your program should ask for a loan amount, and an interest percentage. The output should be in fixed number format with 2 digit after the decimal point.
Turn in runs with the following inputs:
1. Loan: \$10,000, Interest: 5.5%
Line: 65 to 63
21 1000.00 983.79 16.21 1961.73 961.73 22 969.74 961.73 8.01 1969.74 0.00 Payoff in 22 months (1.83) years
Changed:
<
<
The annualized interest is: \$1074.41 a year, or 5.37% a year
>
>

#### Revision 62015-09-20 - JimSkon

Line: 1 to 1

 META TOPICPARENT name="WebHome"

# Lab 2

### Instructions

• Turn in the code (a cpp file or ideone.com link) for each, and the run outputs as requested below.
Changed:
<
<
• Remember to format the ca\ode as described and the book and text, and to include comments including complete commetns at the beginning of the program.
>
>
• Remember to format the code as described and the book and text, and to include comments including complete commetns at the beginning of the program.

Feature %

#### Revision 52015-09-20 - JimSkon

Line: 1 to 1

 META TOPICPARENT name="WebHome"

# Lab 2

>
>

### Instructions

>
>
• Turn in the code (a cpp file or ideone.com link) for each, and the run outputs as requested below.
• Remember to format the ca\ode as described and the book and text, and to include comments including complete commetns at the beginning of the program.

Feature %
Program correctness and completeness with respect to defination 70%
Code Format (Indenting, variable names) 10%
Turning in complete runs as requested 10%

### Problem 1

Write a program that accepts a year written as a four-digit Arabic (ordinary) numeral and outputs the year written in Roman numerals. Important Roman numerals are V for 5, X for 10, L for 50, C for 100, D for 500, and M for 1,000. Recall that some numbers are formed by using a kind of subtraction of one Roman “digit”; for example, IV is 4 produced as V minus I, XL is 40, CM is 900, and so on. A few sample years: MCM is 1900, MCML is 1950, MCMLX is 1960, MCMXL is 1940, MCMLXXXIX is 1989. Assume the year is between 1000 and 3000. Your program should include a loop that lets the user repeat this calculation until the user says she or he is done.

>
>
Your program should give an appropriate error if the input is not a valid four-digit year between 1000 and 3000.

Turn in runs for:

1. 1650
2. 2033
3. 1999
4. 2001
5. A year that is too small
6. A year that is too large

### Problem 2

Interest on a loan is paid on a declining balance, and hence a loan with an interest rate of, say, 14% can cost significantly less than 14% of the balance. Write a program that takes a loan amount and interest rate as input and then outputs the monthly payments and balance of the loan until the loan is paid off. Assume that the monthly payments are one-twentieth of the original loan amount, and that any amount in excess of the interest is credited toward decreasing the balance due. Thus, on a loan of \$20,000, the payments would be \$1,000 a month. If the interest rate is 10%, then each month the interest is one-twelfth of 10% of the remaining balance. The first month, (10% of \$20,000)/12, or \$166.67, would be paid in interest, and the remaining \$833.33 would decrease the balance to \$19,166.67. The following month the interest would be (10% of \$19,166.67)/12, and so forth. Also have the program output the total interest paid over the life of the loan.

Finally, determine what simple annualized percentage of the original loan balance was paid in interest. For example, if \$1,000 was paid in interest on a \$10,000 loan and it took two years to pay off, then the annualized interest is \$500, which is 5% of the \$10,000 loan amount. Your program should allow the user to repeat this calculation as often as desired.

Changed:
<
<
Turn in runs with the following inputs:
>
>
Your program should ask for a loan amount, and an interest percentage. The output should be in fixed number format with 2 digit after the decimal point.

Changed:
<
<
1. 1
>
>
Turn in runs with the following inputs:
1. Loan: \$10,000, Interest: 5.5%
2. Loan: \$4,500, Interest: 13.35%
3. Loan: \$120,000, Interest: 3.55%

```A \$20000.00 loan at 10.00% interest.

```

#### Revision 42015-09-17 - JimSkon

Line: 1 to 1

 META TOPICPARENT name="WebHome"

# Lab 2

Changed:
<
<

>
>

### Problem 1

Line: 17 to 17

1. 1
Changed:
<
<
```A \$20000.00 loan at 10.00% interest.

```
>
>
```A \$20000.00 loan at 10.00% interest.

```
# PAYMENT PRINCIPAL INTEREST TOTAL INTEREST BALANCE 1 1000.00 833.33 166.67 166.67 19166.67

#### Revision 32015-09-14 - JimSkon

Line: 1 to 1

 META TOPICPARENT name="WebHome"

# Lab 2

### Due: Sept 17, 11:55pm

Line: 13 to 13
Finally, determine what simple annualized percentage of the original loan balance was paid in interest. For example, if \$1,000 was paid in interest on a \$10,000 loan and it took two years to pay off, then the annualized interest is \$500, which is 5% of the \$10,000 loan amount. Your program should allow the user to repeat this calculation as often as desired.
Changed:
<
<
```A \$20000.00 loan at 10.00% interest.

```
>
>
Turn in runs with the following inputs:

Changed:
<
<
# PAYMENT PRINCIPAL INTEREST TOTAL INTEREST BALANCE
>
>
1. 1

```A \$20000.00 loan at 10.00% interest.

#	PAYMENT		PRINCIPAL	INTEREST	TOTAL INTEREST	BALANCE

```
1 1000.00 833.33 166.67 166.67 19166.67 2 1000.00 840.28 159.72 326.39 18326.39 3 1000.00 847.28 152.72 479.11 17479.11
Line: 39 to 44
21 1000.00 983.79 16.21 1961.73 961.73 22 969.74 961.73 8.01 1969.74 0.00 Payoff in 22 months (1.83) years
Changed:
<
<
The annualized interest is: 18.61% a year
>
>
The annualized interest is: \$1074.41 a year, or 5.37% a year

>
>
Solution

#### Revision 22015-09-08 - JimSkon

Line: 1 to 1

 META TOPICPARENT name="WebHome"

# L a b 2

### Due: Sept 17, 11:55pm

Line: 8 to 8
Write a program that accepts a year written as a four-digit Arabic (ordinary) numeral and outputs the year written in Roman numerals. Important Roman numerals are V for 5, X for 10, L for 50, C for 100, D for 500, and M for 1,000. Recall that some numbers are formed by using a kind of subtraction of one Roman “digit”; for example, IV is 4 produced as V minus I, XL is 40, CM is 900, and so on. A few sample years: MCM is 1900, MCML is 1950, MCMLX is 1960, MCMXL is 1940, MCMLXXXIX is 1989. Assume the year is between 1000 and 3000. Your program should include a loop that lets the user repeat this calculation until the user says she or he is done.

### Problem 2

Deleted:
<
<
Interest on a loan is paid on a declining balance, and hence a loan with an interest rate of, say, 14% can cost significantly less than 14% of the balance. Write a program that takes a loan amount and interest rate as input and then outputs the monthly payments and balance of the loan until the loan is paid off. Assume that the monthly payments are one-twentieth of the original loan amount, and that any amount in excess of the interest is credited toward decreasing the balance due. Thus, on a loan of \$20,000, the payments would be \$1,000 a month. If the interest rate is 10%, then each month the interest is one-twelfth of 10% of the remaining balance. The first month, (10% of \$20,000)/12, or \$166.67, would be paid in interest, and the remaining \$833.33 would decrease the balance to \$19,166.67. The following month the interest would be (10% of \$19,166.67)/12, and so forth. Also have the program output the total interest paid over the life of the loan.

Finally, determine what simple annualized percentage of the original loan balance was paid in interest. For example, if \$1,000 was paid in interest on a \$10,000 loan and it took two years to pay off, then the annualized interest is \$500, which is 5% of the \$10,000 loan amount. Your program should allow the user to repeat this calculation as often as desired.

\ No newline at end of file
>
>
Interest on a loan is paid on a declining balance, and hence a loan with an interest rate of, say, 14% can cost significantly less than 14% of the balance. Write a program that takes a loan amount and interest rate as input and then outputs the monthly payments and balance of the loan until the loan is paid off. Assume that the monthly payments are one-twentieth of the original loan amount, and that any amount in excess of the interest is credited toward decreasing the balance due. Thus, on a loan of \$20,000, the payments would be \$1,000 a month. If the interest rate is 10%, then each month the interest is one-twelfth of 10% of the remaining balance. The first month, (10% of \$20,000)/12, or \$166.67, would be paid in interest, and the remaining \$833.33 would decrease the balance to \$19,166.67. The following month the interest would be (10% of \$19,166.67)/12, and so forth. Also have the program output the total interest paid over the life of the loan.

Finally, determine what simple annualized percentage of the original loan balance was paid in interest. For example, if \$1,000 was paid in interest on a \$10,000 loan and it took two years to pay off, then the annualized interest is \$500, which is 5% of the \$10,000 loan amount. Your program should allow the user to repeat this calculation as often as desired.

```A \$20000.00 loan at 10.00% interest.

#   PAYMENT      PRINCIPAL   INTEREST   TOTAL INTEREST   	BALANCE
1   1000.00      833.33      166.67      166.67         19166.67
2   1000.00      840.28      159.72      326.39         18326.39
3   1000.00      847.28      152.72      479.11         17479.11
4   1000.00      854.34      145.66      624.77         16624.77
5   1000.00      861.46      138.54      763.31         15763.31
6   1000.00      868.64      131.36      894.67         14894.67
7   1000.00      875.88      124.12      1018.79         14018.79
8   1000.00      883.18      116.82      1135.61         13135.61
9   1000.00      890.54      109.46      1245.08         12245.08
10   1000.00      897.96      102.04      1347.12         11347.12
11   1000.00      905.44      94.56      1441.68         10441.68
12   1000.00      912.99      87.01      1528.69         9528.69
13   1000.00      920.59      79.41      1608.10         8608.10
14   1000.00      928.27      71.73      1679.83         7679.83
15   1000.00      936.00      64.00      1743.83         6743.83
16   1000.00      943.80      56.20      1800.03         5800.03
17   1000.00      951.67      48.33      1848.36         4848.36
18   1000.00      959.60      40.40      1888.77         3888.77
19   1000.00      967.59      32.41      1921.17         2921.17
20   1000.00      975.66      24.34      1945.52         1945.52
21   1000.00      983.79      16.21      1961.73         961.73
22   969.74      961.73      8.01      1969.74         0.00
Payoff in 22 months (1.83) years
The annualized interest is: 18.61% a year
```

#### Revision 12015-09-08 - JimSkon

Line: 1 to 1
>
>
 META TOPICPARENT name="WebHome"

# L a b 2

### Problem 1

Write a program that accepts a year written as a four-digit Arabic (ordinary) numeral and outputs the year written in Roman numerals. Important Roman numerals are V for 5, X for 10, L for 50, C for 100, D for 500, and M for 1,000. Recall that some numbers are formed by using a kind of subtraction of one Roman “digit”; for example, IV is 4 produced as V minus I, XL is 40, CM is 900, and so on. A few sample years: MCM is 1900, MCML is 1950, MCMLX is 1960, MCMXL is 1940, MCMLXXXIX is 1989. Assume the year is between 1000 and 3000. Your program should include a loop that lets the user repeat this calculation until the user says she or he is done.

### Problem 2

Interest on a loan is paid on a declining balance, and hence a loan with an interest rate of, say, 14% can cost significantly less than 14% of the balance. Write a program that takes a loan amount and interest rate as input and then outputs the monthly payments and balance of the loan until the loan is paid off. Assume that the monthly payments are one-twentieth of the original loan amount, and that any amount in excess of the interest is credited toward decreasing the balance due. Thus, on a loan of \$20,000, the payments would be \$1,000 a month. If the interest rate is 10%, then each month the interest is one-twelfth of 10% of the remaining balance. The first month, (10% of \$20,000)/12, or \$166.67, would be paid in interest, and the remaining \$833.33 would decrease the balance to \$19,166.67. The following month the interest would be (10% of \$19,166.67)/12, and so forth. Also have the program output the total interest paid over the life of the loan.

Finally, determine what simple annualized percentage of the original loan balance was paid in interest. For example, if \$1,000 was paid in interest on a \$10,000 loan and it took two years to pay off, then the annualized interest is \$500, which is 5% of the \$10,000 loan amount. Your program should allow the user to repeat this calculation as often as desired.

Copyright © 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback