Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Monthly payment

Monthly payment

Scheduled Pinned Locked Moved C / C++ / MFC
helpquestionlearning
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • I Offline
    I Offline
    iasaber
    wrote on last edited by
    #1

    I'm a beginner writing my 2nd program. I'm stuck. I'm not sure were the problem is. Monthly payment formuls: payment=rate*(1+rate)n/((1+rate)n-1*L rate=monthly interest rate, n=number of payments L=loan amount. //Patrick Comeau //Monthly Payments //Project 2 //oct 1 03 #include #include #include using namespace std; int main() { float rate = 0.0; //monthly interest rate float nop =0.0; //number of payments float loan =0.0; //amount of loan double pay =0.0 ; //monthly payment double apb= 0.0 ; //amount paid back double intpd = 0.0; //interest paid double num =0.0; double den=0.0; cout<< "What is the loan amount " ; cin>> loan; cout<< "The number of payment is " ; cin>> nop; cout<< "What is the monthly interest rate " ; cin>> rate; cout<< "The Monthly payment is " <

    M A 2 Replies Last reply
    0
    • I iasaber

      I'm a beginner writing my 2nd program. I'm stuck. I'm not sure were the problem is. Monthly payment formuls: payment=rate*(1+rate)n/((1+rate)n-1*L rate=monthly interest rate, n=number of payments L=loan amount. //Patrick Comeau //Monthly Payments //Project 2 //oct 1 03 #include #include #include using namespace std; int main() { float rate = 0.0; //monthly interest rate float nop =0.0; //number of payments float loan =0.0; //amount of loan double pay =0.0 ; //monthly payment double apb= 0.0 ; //amount paid back double intpd = 0.0; //interest paid double num =0.0; double den=0.0; cout<< "What is the loan amount " ; cin>> loan; cout<< "The number of payment is " ; cin>> nop; cout<< "What is the monthly interest rate " ; cin>> rate; cout<< "The Monthly payment is " <

      M Offline
      M Offline
      Mike Danberg
      wrote on last edited by
      #2

      I'm not gonna give you the answer to this because its way too obvious which is why there probably hasn't been a response yet. Here's a hint. Check out your last three cout statements and think about what they are doing. Shouldn't take long to see the problem.

      1 Reply Last reply
      0
      • I iasaber

        I'm a beginner writing my 2nd program. I'm stuck. I'm not sure were the problem is. Monthly payment formuls: payment=rate*(1+rate)n/((1+rate)n-1*L rate=monthly interest rate, n=number of payments L=loan amount. //Patrick Comeau //Monthly Payments //Project 2 //oct 1 03 #include #include #include using namespace std; int main() { float rate = 0.0; //monthly interest rate float nop =0.0; //number of payments float loan =0.0; //amount of loan double pay =0.0 ; //monthly payment double apb= 0.0 ; //amount paid back double intpd = 0.0; //interest paid double num =0.0; double den=0.0; cout<< "What is the loan amount " ; cin>> loan; cout<< "The number of payment is " ; cin>> nop; cout<< "What is the monthly interest rate " ; cin>> rate; cout<< "The Monthly payment is " <

        A Offline
        A Offline
        armentage
        wrote on last edited by
        #3

        You really want to consider Cout'ing pay, apb, and intpd AFTER YOU HAVE CALCULATED THEM.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups