Computer Science, asked by Astha088, 1 year ago

Write a program in Java to assign Principal amount (P), Rate of interest (R) and Time(T). Calculate and print the simple interest using the formula:"SI = (RRT)/100".

Answers

Answered by imalfaizkhan
1

import java.util.Scanner;

import java.util.Scanner;public class Simple_Interest

import java.util.Scanner;public class Simple_Interest{

import java.util.Scanner;public class Simple_Interest{ public static void main(String args[])

import java.util.Scanner;public class Simple_Interest{ public static void main(String args[]) {

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

System.out.print("Enter the Principal : "); p = s.nextFloat();

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

System.out.print("Enter the Rate of interest : "); r = s.nextFloat();

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

System.out.print("Enter the Time period : "); t = s.nextFloat();

float si;

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

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

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

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

Similar questions