Computer Applications
Write a program to calculate the compound interest.
Java
Java Intro
53 Likes
Answer
public class KboatInterest
{
public static void computeInterest(double p, double r, int t) {
double amt = p * Math.pow(1 + (r / 100 ), t);
double interest = amt - p;
System.out.println("Compound Interest = " + interest);
}
}
Output
Answered By
24 Likes
Related Questions
Write a program to calculate the tax for a taxable income of Rs. 4,10,000, if the tax rate is fixed at 3.2%.
Write a program to find the sum and average of three numbers.
Write a program to interchange the value of two numbers without using the third variable.
Create a program that will generate a bill at McDonald's for four vegetable burgers (@ Rs 45 per vegetable Burger) and three vegetable McPuffs (@ Rs 25 per vegetable McPuff). There is a special Independence Day discount of Rs 50 on the final bill amount.