//Calculate Simple Interest
import java.util.Scanner;
class SI {
public static void main(String args[])
{
Scanner sc=new Scanner(System.in);
System.out.println("Enter respectively principle,rate of interest(in %) and duration(in years):");
long p=sc.nextLong();
float r=sc.nextFloat();
float n=sc.nextFloat();
float si=(p*n*r)/100;
System.out.println("Simple Interest:"+si);
}
}
import java.util.Scanner;
class SI {
public static void main(String args[])
{
Scanner sc=new Scanner(System.in);
System.out.println("Enter respectively principle,rate of interest(in %) and duration(in years):");
long p=sc.nextLong();
float r=sc.nextFloat();
float n=sc.nextFloat();
float si=(p*n*r)/100;
System.out.println("Simple Interest:"+si);
}
}
No comments:
Post a Comment