Computer Science, asked by gchan1069, 8 months ago

write a prgramme on java depicting the simple.. intereat of an specific principal,rate,time ss well.. ​

Answers

Answered by Anonymous
11

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);

}

}

Output:

Enter the Principal : 2000

Enter the Rate of interest : 6

Enter the Time period : 3

Simple Interest is: 360.0

Follow me dear for your future doubts ❤️❤️

Answered by Anonymous
12

\huge\underline\bold\red{AnswEr}

JAVA

public class Main

{

public static void main (String args[])

{ float p, r, t, si; // principal amount, rate, time and simple interest respectively

p = 13000; r = 12; t = 2;

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

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

}}

Output:

Simple Interest is: 3120.0

Similar questions