- Trending Categories
- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP

- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who

# Write C program to calculate balance instalment

## Problem

Write a C program to calculate a balance installment that is to be paid after every month for a particular loan amount (with interest).

## Solution

Following is the formula to calculate interest when the loan amount is given −

i=loanamt * ((interest/100)/12);

Following calculation gives amount with interest −

i=i+loanamt; firstmon=i-monthlypayment; //first month payment with interest i=firstmon * ((interest/100)/12);

## Program

#include<stdio.h> int main(){ float loanamt,interest,monthlypayment; float i,firstmon,secondmon; printf("enter the loan amount:"); scanf("%f",&loanamt); printf("interest rate:"); scanf("%f",&interest); printf("monthly payment:"); scanf("%f",&monthlypayment); //interest calculation// i=loanamt * ((interest/100)/12); //amount with interest i=i+loanamt; firstmon=i-monthlypayment; //first month payment with interest i=firstmon * ((interest/100)/12); i=i+firstmon; secondmon=i-monthlypayment; //second month payment with interest printf("remaining amount need to pay after 1st installment:%.2f\n",firstmon); printf("remaining amount need to pay after 2nd installment:%.2f\n",secondmon); return 0; }

## Output

enter the loan amount:45000 interest rate:7 monthly payment:1000 remaining amount need to pay after 1st installment:44262.50 remaining amount need to pay after 2nd installment:43520.70

- Related Questions & Answers
- Write a C# program to calculate a factorial using recursion
- Write a program to calculate pow(x,n) in C++
- Calculate depreciation using diminishing balance method
- Write a program to Calculate Size of a tree - Recursion in C++
- C program to calculate age
- C++ Program to Calculate Standard Deviation
- C++ Program to calculate Double Integration
- Write a C program to calculate the average word length of a sentence using while loop
- C++ Program to Calculate Power Using Recursion
- C++ program to calculate Profit Or Loss
- C program to calculate the standard deviation
- Write a program to calculate the least common multiple of two numbers JavaScript
- C++ Program to Calculate Sum of Natural Numbers
- C++ Program to Calculate Power of a Number
- C program to calculate the value of nPr?

Advertisements