By Sagar Naskar
Java program to calculate monthly EMI using simple interest. The output is taken to 2 decimal places.
This Java program will calculate the amount of EMI one needs to pay each month in order to pay off the total loan amount.
Input format: Double amt- loan amount. Int rate- rate of interest. Int time- number of months in which the total loan will be payed off.
Output format: Double a- will print the EMI to be payed each month upto 2 decimal places.
The total loan will be calculated on the price, using simple interest, then it will calculate the EMI. The libraries used are java.util, java.math.RoundingMode and java.text.DecimalFormat. It will display the EMI upto 2 decimal places. The objects used are: Scanner (The scanner is used to take the input data) and DecimalFormat (The DecimalFormat is used to print the output upto 2 decimal places).
Submitted by Sagar Naskar (sagarN)
Download packets of source code on Coders Packet