Computer Science, asked by amaira1609, 9 months ago

Question 3:
Write a program in Java to find the Simple Interest and Amount when Principal,
Rate of interest and time period are given.
(If the question says: are given – Use Assignment Statement)​

Answers

Answered by sharoanlukeshibu
10

Answer:import java.util.Scanner;

public class Simple_Interest

{

   public static void main(String args[])  

   {

       float p, r, t;

       Scanner s = new Scanner(System.in);

       System.out.print("Enter the Principal : ");

       p = s.nextFloat();

       System.out.print("Enter the Rate of interest : ");

       r = s.nextFloat();

       System.out.print("Enter the Time period : ");

       t = s.nextFloat();

       float si;

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

       System.out.print("The Simple Interest is : " + si);

   }

}

Explanation:

hope it helps

Similar questions