➽ Program:-
import java.util.*;
class Main
{
public static void
main(String args[])
{
float
principal_amount, rate, time, simple_interest;
Scanner
sc = new Scanner(System.in);
System.out.print("Enter a Principal Amount: ");
principal_amount = sc.nextFloat();
System.out.print("Enter time(in years): ");
time =
sc.nextFloat();
System.out.print("Enter Rate: ");
rate =
sc.nextFloat();
simple_interest = (principal_amount * rate * time) / 100;
System.out.println("Simple Interest = " + simple_interest);
}
}
➽ Output:-
0 Comments
Please do not enter any spam link in the comment section.