Simple Interest Program in Java
Simple Interest = (Princple * Rate * Time)/100
import java.util.Scanner;
public class JavaSimpleInterest
{
public static void main(String[] args)
{
int p,r,t,si;
Scanner sc=new Scanner(System.in);
System.out.print("Enter a amount=");
p=sc.nextInt();
System.out.print("Enter a rate=");
r=sc.nextInt();
System.out.print("Enter a time=");
t=sc.nextInt();
si=(p*r*t)/100;
System.out.println("Simple interest="+si);
}
}
Output:
Enter a amount=1000 Enter a rate=10 Enter a time=3 Simple interest=300b. tech. bca icse java mca programs