Computer Science, asked by likithusp9636, 11 months ago

Write a program in Java to assign Principal amount (P), Rate of interest (R) and Time (T) . Calculate and print the simple interest using the formula :"SI = (PRT)/100".

Answers

Answered by ayaan12396
2

Answer:

Please become my follower

import java.util.*;

public class SimpleInterest

{

public static void main ()

{

Scanner in= new Scanner (System.in);

double si=0.0;

System.out.println("Enter the principal amount, rate of interest and time");

//look I am assuming that the user enters the data in fraction else you can also use int instead of Double

double p= in.nextDouble();

double r=in.nextDouble();

double t=in.nextDouble();

si= (p*r*t)/100.0;

System.out.println(" The simple interest="+si);

}

}

Similar questions