Menu
Question Index
...

Write a program to calculate the EMI (Equal Monthly Installment), given the loan amount, the interest rate and time in months. The output should be rounded to one decimal as shown below.

Input (int, double, int) Output (double)
20000, 10.5, 60 429.9
250000, 12.5, 180 3081.3
500000, 7.5, 240 4028.0
10000, 10, 24 461.4
1575, 15.6, 24 76.8
7500000, 13.75, 60 173541.3
0, 1, 12 null


import java.text.*;
class CalculateEMI
{
    public static void main(String s[])
    {
        int principal = 10000;
        double interestRate = 10;
        int loanInMonths = 24;
        Double emi = calculateEMI(principal, interestRate, loanInMonths);
        System.out.println("The EMI for this loan is : " + emi);

    }


    public static Double calculateEMI(int principal, double interestRate, int loanInMonths) {
    Double result = null;
    return result;
    }

}

Doubts

Problems

Topic: Other Advanced Topics In Java

Read this topic
Take test on this topic

0
Wrong
Score more than 2 points

© meritcampus 2019

All Rights Reserved.

Open In App