Thursday, October 15, 2020

Simple Interest Loan Solver in Java

 I will show you how to write a Java program to calculate simple interest loan by the customer in lending or a bank.

I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me in the following email address for further details.  If you want to advertise on my website kindly contact me also in my email address also. Thank you.


My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.

My telephone number at home here in Bacolod City, Negros Occidental Philippines is  +63 (034) 4335675.

Here in Bacolod City I also accepting computer repair, networking and Arduino Project development at a very affordable price.


Program Listing

import java.util.Scanner;

public class Simple_Interest_Solver {

public Simple_Interest_Solver() {
// TODO Auto-generated constructor stub
public static void main(String[] args) {
// TODO Auto-generated method stub
// create an object of Scanner class
Scanner input = new Scanner(System.in);

   System.out.println("\n");
   System.out.print("\t\tSimple Interest Loan Solver in Java");
   System.out.println("\n");
    
    // take input from users
    System.out.print("\tGive the principal amount : ");
    double principal = input.nextDouble();

    System.out.print("\tGive the interest rate: ");
    double rate = input.nextDouble();
    rate = rate/100;

    System.out.print("\tGive the time: ");
    double time = input.nextDouble();

    double interest = (principal * time * rate) / 100;

    System.out.println("\n");
    System.out.println("Principal: $ " + principal);
    System.out.println("Interest Rate: " + rate);
    System.out.println("Time Duration: " + time);
    System.out.println("Simple Interest: $ " + interest);
    System.out.print("\n");
          System.out.println("\tEnd of Program");
    System.out.println("\n\n");
    input.close();
             
}

}



No comments:

Post a Comment