From aca657eaaac0f5e4630aa4bce9c5b8efcf60fa30 Mon Sep 17 00:00:00 2001 From: sidsriedu Date: Sat, 30 Oct 2021 23:25:15 +0530 Subject: [PATCH] Simple Interest --- java/Simple_Interest.java | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 java/Simple_Interest.java diff --git a/java/Simple_Interest.java b/java/Simple_Interest.java new file mode 100644 index 00000000..259abab3 --- /dev/null +++ b/java/Simple_Interest.java @@ -0,0 +1,18 @@ +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); + } +} \ No newline at end of file