Interest Calculator using C++

c++ is very fast because it is a memory managing language. today we made a interest calculator using c++.

Namaste!

Today, I started learning C++ concepts and really learned some things.

I practiced them on vscode and made a simple interest calculator NAtive Application.

First, open your code editor then we have to define a function operation for calculating the interest of the value which we will give to the program.

//This is function for calculation of Interest
float FinalAmount(int currentmoney, float factor){
    return currentmoney+((currentmoney*factor)/100);
}

Now, we will go to main( ) and write the code for input value and output value.

for input we will use cin>>Your variable;

for output we will right cout<<“Text to Print”<<Variable <<endl;

*endl is used for line break as we use <br> in .html

 int money;
    float Interest;
    cout<<"Enter the money you have"<<endl;
    cin>>money;
    cout<<money<<" Rs. you have now"<<endl;
    cout<<"Now Enter the interest rate"<<endl;
    cin>>Interest;
    cout<<"If you have "<<money<<" and Interest Rate is "
        <<Interest<<" Then Final Amount will be "
        <<FinalAmount(money,Interest)<<endl;
    cout<<"Where Interest Amount is "
        <<(FinalAmount(money,Interest)-money)<<"Rs."<<endl;
    cout<<money<<" + "<<(FinalAmount(money,Interest) - money)
        <<" = "<<FinalAmount(money,Interest)<<"Rs."<<endl;
    cout<<"Thank You!"<<endl;

The final code will look like this,

Interest Calculator using C++

Thank You!

Share your love
Neeraj Lamba
Neeraj Lamba
Articles: 39

Leave a Reply

Your email address will not be published.

I'm not a robot *Captcha loading...

Website Design Trends in 2022 5 Movies that Programmers Should Watch Best Search Engine for Developers – You.com 06 Free Website Hosting Providers for Developers You should Know Learn Programming while playing games
Secured By miniOrange