C++ Program to Build Monthly EMI Installment Loan Calculator and Interest on Command Line

Using this tutorial, We are going to discuss the topic of “C++ Program to Build Monthly EMI Installment Loan Calculator and Interest on Command Line” below. Let’s start the discussion to do this task successfully.

C++ Program to Build Monthly EMI Installment Loan Calculator and Interest on Command Line

C++ Program to Build Monthly EMI Installment Loan Calculator and Interest on Command Line

Source Code

#include<iostream>

using namespace std;

int main(){
    double loan_amount,interest_rate,number_of_years,total_amount,monthly_amount;

	cout<<"Enter the loan amount: ";
	cin>>loan_amount;
	cout<<endl;
	cout<<"Enter the interest rate: ";
	cin>>interest_rate;
	cout<<endl;
	cout<<"The number of years: ";
	cin>>number_of_years;
	cout<<endl;

	total_amount=(number_of_years*loan_amount)+(number_of_years*loan_amount*(interest_rate/100.00));
	monthly_amount=total_amount/(number_of_years*12);

	cout<<"Total amount to be paid: "<<total_amount<<endl;
	cout<<"Total interest: "<<total_amount-(number_of_years*loan_amount)<<endl;
	cout<<"Monthly amount to be paid: "<<monthly_amount<<endl;

	return 0;
}

Final Thoughts

I hope this article helps you to understand “C++ Program to Build Monthly EMI Installment Loan Calculator and Interest on Command Line”. If you have any doubts regarding this article please let us know via the comment section. Share this article with your friends via social networks. Thank You!

Share on:

Hi, I'm Ranjith a full-time Blogger, YouTuber, Affiliate Marketer, & founder of Coding Diksha. Here, I post about programming to help developers.

Leave a Comment