Computer Science, asked by srivanithaduri1, 2 months ago


Write a program to calculate Simple Interest by passing arguments
through main().

[Hint: Sl= (P*T*R)/100)​

Answers

Answered by RithwikAnantha
1

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

}

}

Explanation:

Please mark it brainliest as it took a lot of time to do this question

Similar questions