C++ Program --To calculate the compound interest using CI = P(1+R/100)^T - P


Posted Date:     Total Responses: 0    Posted By: K Dinesh Reddy   Member Level: Gold   Points/Cash: 5   


// To calculate the compound interest using CI = P(1+R/100)^T - P
#include
using namespace std;
int main()
{
float CI, P, r, x;
int t;
cout <<"Enter the principal: ";
cin >> P;
cout << "\n Enter rate: ";
cin >> r;
cout << "\n Enter time: ";
cin >> t;
x = P*pow((1.+r/100.), t);
CI = x - P;
cout << "\n The Compound Interest is: " << CI << endl;

system ("pause");
return 0;
}


Note: In the program, After #include "" tag is there... But it is not seen as the post is considered as a HTML post... So please don't forget this point... The original file is uploaded as attachment... Check that also...




With Regards,
ZORO
IIT Madras - CSE



Attachments

  • C++ Program : To calculate the compound interest using CI = P(1+R/100)^T - P (2080-31827-2.txt)

  • Project Feedbacks

    Author: Member Level: BronzeRevenue Score: 5 out of 55 out of 55 out of 55 out of 55 out of 5
    I've corrected some small mistakes:


    // To calculate the compound interest using CI = P(1+R/100)^T - P
    #include<iostream>
    #include<cmath>
    using namespace std;
    int main()
    {
    double CI, P, r, x;
    int t;
    cout <<"Enter the principal: ";
    cin >> P;
    cout << "\n Enter rate: ";
    cin >> r;
    cout << "\n Enter time: ";
    cin >> t;
    x = P*pow((1.0+r/100.0), t);
    CI = x - P;
    cout << "\n The Compound Interest is: " << CI << endl;
    system ("pause");
    return 0;
    }


    Author: Member Level: BronzeRevenue Score: 1 out of 5
    Yea it a very nice one.. Keep it up


    Post Feedback
    You must Sign In to post a feedback.
    Next Project: Basic Program of C++ - How to accept input from user?
    Previous Project: C++ program --To check whether one number is divisible by other using simple if statement

    Return to Project Index

    Post New Project


    Related Projects

    Awards & Gifts
    Active Members
    TodayLast 7 Daysmore...

    Online Members

    SUPARNA
    More...
    ISC Technologies, Kochi - India. Copyright © All Rights Reserved.