write a program to find simple interest in java
Answers
Answered by
5
simple interest formula PNR into 3 upon hundred P means principal, r,means rate and t, means time
Answered by
15
Java Program to Find the Simple Interest
This is a Java Program to Find the Simple Interest.
Formula:
Simple Interest = (Principal * Rate * Time)/100
Enter the principal, rate of interest and time period as input. Now we use the given formula to calculate the simple interest.
Here is the source code of the Java Program to Find the Simple Interest. The Java program is successfully compiled and run on a Windows system. The program output is also shown below.
import java.util.Scanner;
public class Simple_Interest
{
public static void main(String args[])
{
float p, r, t;
Scanner s = new Scanner(System.in);
System.out.print("Enter the Principal : ");
p = s.nextFloat();
System.out.print("Enter the Rate of interest : "); r = s.nextFloat();
System.out.print("Enter the Time period : ");
t = s.nextFloat();
float si; si = (r * t * p) / 100;
System.out.print("The Simple Interest is : " + si);
}
}
This is a Java Program to Find the Simple Interest.
Formula:
Simple Interest = (Principal * Rate * Time)/100
Enter the principal, rate of interest and time period as input. Now we use the given formula to calculate the simple interest.
Here is the source code of the Java Program to Find the Simple Interest. The Java program is successfully compiled and run on a Windows system. The program output is also shown below.
import java.util.Scanner;
public class Simple_Interest
{
public static void main(String args[])
{
float p, r, t;
Scanner s = new Scanner(System.in);
System.out.print("Enter the Principal : ");
p = s.nextFloat();
System.out.print("Enter the Rate of interest : "); r = s.nextFloat();
System.out.print("Enter the Time period : ");
t = s.nextFloat();
float si; si = (r * t * p) / 100;
System.out.print("The Simple Interest is : " + si);
}
}
rajesh205:
wait 5 min i am busy with parents pls pls pls
Similar questions