Computer Applications

Write a program in Java that uses 'input using initialisation' to calculate the Simple Interest and the Total Amount with the given values:

i. Principle Amount = Rs. 20000
ii. Rate = 8.9%
iii. Time = 3 years

Java

Input in Java

48 Likes

Answer

public class KboatInterest
{
    public static void main(String args[]) {
        int p = 20000;
        double r = 8.9;
        int t = 3;
        double si = p * r * t / 100.0;
        double amt = p + si;
        System.out.println("Simple Interest = " + si);
        System.out.println("Total Amount = " + amt);
    }
}

Output

Answered By

21 Likes


Related Questions