Hahahahah.. Yeah turn this code in :) BTW, the most annoying thing happens

when I read news in Outlook Express 5... anytime there is code in a message

showing a line with the // comments, Outlook Express in its infinite

wisdome will change something like:

// Hi I am a comment

to

file://Hi I am a comment

This is the most annoying thing. I guess when it sees // it automatically

wants it to be an HTML thing. I've checked everyone option I can find in

Outlook Express to turn off such annoying "Auto Fix" things, but I can't

find any.. Please help me get rid of this annoying ness.. thanks

charles evans

tack <mtrjlt@hotmail.com> wrote in message news:38bad5a4$1@news.devx.com...

>

> Am I being too kind or what?

> Here's the source you wanted.

>

> #include <iostream> file://for cout and cin object

> #include <cmath> file://for ciel() and pow() function

> using namespace std; file://namespace for the headers

>

> double estimate(double n)

> {

> file://leaves the 2 decimal

> return ceil(n*100)/100;

> }

>

> void main()

> {

> double monthly_payment = 165.25;

> int number_of_payments = 36;

> double annual_intrest = 0.09;

>

>

> begin:

> cout << "Enter the monthly payment :";

> cin >> monthly_payment;

>

> cout << "Enter the annual intrest :";

> cin >> annual_intrest;

> // allow input in either percentage and decimal

> annual_intrest = ( annual_intrest > 1 ) ? annual_intrest/100 :

annual_intrest;

>

> cout << "Enter the number of payments :";

> cin >> number_of_payments;

>

> file://confirmation

> cout << "\n\n";

> cout << "monthly payment:" << monthly_payment << "\n";

> cout << number_of_payments << " times\n";

> cout << "annual intrest:" << annual_intrest*100 << "%\n";

> char YESorNO;

> cout << "Is this okay? (y/n) ";

> cin >> YESorNO;

> if (( YESorNO == 'n' )||( YESorNO == 'N' ))

> goto begin;

>

>

> file://execute calculation

> cout << "monthly payment :" << monthly_payment << " dollars ";

> cout << "intrest :" << annual_intrest*100 << "% ";

> cout << "(monthly :" << estimate(annual_intrest*100/12) << "%) ";

> cout << number_of_payments << " payments\n";

>

> double remaining_bal;

> int month;

> for (month=0; month <= 3; month++)

> {

> file://The formula you provided didn't work, so let me use mine

> remaining_bal = monthly_payment/annual_intrest*12

>

*(pow(1-annual_intrest/12,month)-pow(1-annual_intrest/12,number_of_payments)

);

>

> file://who pays for minus balance?

> if (remaining_bal<0)

> break;

>

> if (month != 0)

> cout << month << "\t ";

> else

> cout << "price\t ";

> cout << estimate( remaining_bal ) << "dollars\n";

> }

> }

>

>

> I'll be waiting for your mail.;-)

>

>

> "boobless" <boobless@comic.com> wrote:

> >

> >-You have bought a car, taking out a loan with an annual interest rate of

> >9%. You will make 36 monthly payments

> >of $165.25 each. You want to keep track of remaining balance you owe

after

> >each monthly payment. The formula

> >for the remaining balance is:

> >BAL k =pmt[ 1-(1+i)^k-n/ i]

> >

> >-BAL k= balance remaining after the Kth payment

> >-k= payment number (1,2,3...)

> >-pmt= amount of the monthly payment

> >-i= interest per month(annual rate / 12)

> >-n= total number of payments to be made

> >

> >Write a program to calculate and print the balance remaning after the

first,

> >second and the third monthly car

> >payments. Before printing these three results, the program should output

> >the valuse on which the calculations

> >are based (monthly payment, interest rate and total numbers of payments).

> >Lable all output with identifying

> >message and print all money amounts to two decimal places.

> >----------------------------------------

> >

> >HELPPPP!!!!!!!!

> >

> >

>