Computer Science, asked by tejasprashanth44, 2 days ago

Write a program to calculate simple interest. (SI=PTR/100)

Answers

Answered by uparihar771
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 Helsh
0
Program to calculate simple interest
Attachments:
Similar questions