Computer Science, asked by ayushredeye8, 8 months ago

write a program to accept the principal rate time from user and calculate​

Answers

Answered by Anonymous
1

Answer:

import java.util.Scanner;

class simple_interest

{

   public static void main(String[]args)

   {

       Scanner sc=new Scanner(System.in);

       System.out.println("Enter principle");

       int p=sc.nextInt();

       System.out.println("Enter rate");

       int r=sc.nextInt();

       System.out.println("Enter time");

       int t=sc.nextInt();

       int SI = (p*r*t)/100;

       System.out.println(p);

       System.out.println(r);

       System.out.println(t);

       System.out.println(SI);

   }

}

Similar questions