Herzlich Willkommen, lieber Gast!
  Sie befinden sich hier:

  Forum » C / C++ (ANSI-Standard) » A simple question

Forum | Hilfe | Team | Links | Impressum | > Suche < | Mitglieder | Registrieren | Einloggen
  Quicklinks: MSDN-Online || STL || clib Reference Grundlagen || Literatur || E-Books || Zubehör || > F.A.Q. < || Downloads   

Autor Thread - Seiten: > 1 <
000
13.08.2007, 10:37 Uhr
~NICK
Gast


What I want you to do is write a program that will track a loan amount
over time as interest is added to the loan and repayments are made. Start
by asking the user to enter an annual percentage interest rate, an initial loan
amount and the amount of monthly repayments they will make. When you
have this information calculate the amount of interest for that month, add
it to the total and then subtract the monthly repayment for that month.
Continue the calculations until the loan amount is at zero dollars (or below).
This should be a relatively easy task and there may even be code on the
system that will deal with this - look around for it, though you may have to
change it a bit.
When you have done this, I want you to use the setprecision, setw
and fixed manipulators defined in the <iomanip> header to control the
formatting of numbers. Add some lines of output to your program to print
out a table formatted like the following:
Month Balance Interest Payment
1 $ 10050.00 $ 100.50 $ 500.00
2 $ 9650.50 $ 96.51 $ 500.00
3 $ 9247.01 $ 92.47 $ 500.00
4 $ 8839.48 $ 88.39 $ 500.00
Use setw to set each column width, and use fixed and setprecision to
properly show dollars and cents.
 
Profil || Private Message || Suche Download || Zitatantwort || Editieren || Löschen || IP
001
13.08.2007, 10:48 Uhr
Guybrush Threepwood
Gefürchteter Pirat
(Operator)


Ok, have fun with it

Or do you have any question about how to do it?
 
Profil || Private Message || Suche Download || Zitatantwort || Editieren || Löschen || IP
002
13.08.2007, 13:22 Uhr
0xdeadbeef
Gott
(Operator)


Kein Hausaufgabenservice / no homework service.
--
Einfachheit ist Voraussetzung für Zuverlässigkeit.
-- Edsger Wybe Dijkstra
 
Profil || Private Message || Suche Download || Zitatantwort || Editieren || Löschen || IP
Seiten: > 1 <     [ C / C++ (ANSI-Standard) ]  


ThWBoard 2.73 FloSoft-Edition
© by Paul Baecher & Felix Gonschorek (www.thwboard.de)

Anpassungen des Forums
© by Flo-Soft (www.flo-soft.de)

Sie sind Besucher: