Write a program to calculate simple interest. (SI=PTR/100)
Answers
Answered by
0
This program is written by using java
ANSWER-
import java.util.Scanner;
public class JavaExample
{
public static void main(String args[])
{
float p, r, t, sinterest;
Scanner scan = new Scanner(System.in);
System.out.print("Enter the Principal : ");
p = scan.nextFloat();
System.out.print("Enter the Rate of interest : ");
r = scan.nextFloat();
System.out.print("Enter the Time period : ");
t = scan.nextFloat();
scan.close();
sinterest = (p * r * t) / 100;
System.out.print("Simple Interest is: " +sinterest);
}
}
Answered by
0
Program to calculate simple interest
Attachments:
Similar questions
Social Sciences,
1 day ago
English,
1 day ago
English,
2 days ago
Math,
2 days ago
Computer Science,
8 months ago