Computer Science, asked by anandiairy53, 5 months ago

write a program in java to find and display the simple interest by accepting the principal, rate of interest and time period fromthe user. use approprite datatypes​

Answers

Answered by SpaceWalker17
1

\large\underline{\underline\mathrm\green{JAVA\:PROGRAM}}

import java.util.*;

public class interest

{

public static void main(String args[])

{

Scanner sc = new Scanner(System.in);

System.out.println("Enter the principal");

float p = sc.nextFloat();

System.out.println("Enter the Rate");

float r = sc.nextFloat();

System.out.println("Enter the Time Period");

float t = sc.nextFloat();

float si = (p*r*t)/100;

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

}

}

Similar questions