There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
 
Tag Cloud
access audio avg avg 8 bios blue screen boot bsod computer connection cpu crash css dell desktop dma driver drivers dvd email error excel explorer firefox firefox 3 freeze gimp graphics hard drive hardware hijackthis hjt install internet internet explorer itunes keyboard laptop macro malware monitor motherboard network networking outlook outlook 2003 outlook 2007 outlook express pio problem problems router seo server slow sound sp3 spyware trojan usb video virtumonde virus vista vundo windows windows vista windows xp winxp wireless
Software Development
Search
Search in:
 
Advanced Search
Tech Support Guy Forums > Software & Hardware > Software Development >
Out Stream Loop problems!!!!


HELLO AND WELCOME! Before you can post your question, you'll have to register -- it's completely free! Click here to join today! We highly recommend that you print a copy of our Guide for New Members. Enjoy!

 
Thread Tools
Rhubes's Avatar
Junior Member with 11 posts.
 
Join Date: Oct 2003
10-Nov-2003, 01:36 AM #1
Out Stream Loop problems!!!!
ERrr i'm so frustrated...

I'm doing a c++ assignment based on a loan amortization table..

In it the user enters in 3 values... Loan Amount... Interest Percentage rate.. and Number of Months to payback the loan..

From that were supposed to seperate the monthly payments into a table... and include values for Payment Number, Interest Paid, Principal Paid, Cumulative Interest Paid, Total Paid to Date, and New Balance

Above the table are the Loan Amount, Interest Percentage Rate Amount, Number of Months amount, and Monthly Payment amount (based on a formula from teacher)..

I'm using multiple functions for each variable i mentioned, plus one for the outstream table...

When I try to loop it all in main so that it carries through each function then outputs the values.. then repeats until all the monthly payments have been made instead it shows this:

Amount Annual%Interest Months Monthly Payment
1500.00 0.14 12.00 134.68
-----------------------------------------------------------------------------------
Payment Interest Principal Cumulative Total Paid New Balance
Number Paid Paid Interest to Date Due
-----------------------------------------------------------------------------------
0.00 17.50 117.18 210.00 0.00 1382.82

: It doesn't even show the payment number properly (which is a function set up just to add 1 and output itself (pay_num++
: It adds up the sum of all 12 monthly payments and then outputs the total once for the Cumulative Interest
: It doesn't even give a value for Total Paid to Date
which function is:

Total_Paid = Total_Paid + Principal_Paid; (with total_paid being set to 0)

The total paid function does the same as the cumulative when I put a reference variable next to it (takes the sum of all 12 payments and outputs it one time!)

I'm using reference variables.. and i'm not 100% with some...

I know for specific help you'd need to see my whole code and the actual assignment... But ANY SUGGESTIONS would help a lot!!

thanks!
Crowe182's Avatar
Junior Member with 14 posts.
 
Join Date: Oct 2003
11-Nov-2003, 12:27 AM #2
put your code in so I can see whay you got.
Use [code] "Your Code Here" [\code] so it will show the indents properly. I'll see what I can do for ya.
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are Off
Refbacks are Off

You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 08:17 AM.
Copyright © 1996 - 2008 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Powered by Cermak Technologies, Inc.