Machine Problem

Write a  simple interest program that will ask the principal amount, rate of the loan, and a number of years.  The program will compute the interest rate of the loan of the customer and display the results on the screen.

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,, and

My mobile number here in the Philippines is 09173084360.

Please subscribe to my channel


Want to support my channel?

GCash Account

Jake Pomperada




Thank you very much for your support

Program Listing

/* Simple_Interest.scala
   Prof. Jake Rodriguez Pomperada, MAED-IT, MIT and
   November 12, 2021  2:22 PM Friday
   Bacolod City, Negros Occidental

import java.util.Scanner;

object Simple_Interest {

  def main(args: Array[String]) : Unit = {

    var input = new Scanner(;

    print("\tSimple Interest Using Scala");
    print("\tEnter the Principal Amount  : ");
    var principal = input.nextDouble();

    print("\tEnter Rate                  : ");
    var rate = input.nextDouble();

    print("\tEnter Time (No. of Years)  : ");
    var time = input.nextDouble();

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

    print("\tThe Principal Amount     : PHP  " + f"$principal%5.2f" );
    print("\tThe Interest Rate        :      " + f"$rate%5.0f" + "%");
    print("\tThe Time Duration        :      " + f"$time%5.0f");
    print("\tThe Simple Interest      : PHP  " + f"$interest%5.2f" );
    print("\tEND OF PROGRAM");

Leave a Reply

Your email address will not be published.