Wednesday, May 29, 2019

Loan Interest Solver in Ruby

Create a program that will ask the user the principal amount, number of years and interest rate of the loan of the customer and then the program will compute the interest amount to be paid by the customer and display the result on the screen using Ruby programming language.

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 I also accepting computer repair, networking and Arduino Project development at a very affordable price.

My personal website is http://www.jakerpomperada.com



Sample Program Output


Program Listing

# loan.rb
# Written By Mr. Jake Rodriguez Pomperada,BSCS,MAED-IT
# Tools : Ruby 2.6.3 and Sublime Text Editor 
# May 13, 2019    Monday   9:58 PM
# Bacolod City, Negros Occidental
# Website       : http://www.jakerpomperada.com
# Email Address : jakerpomperada@gmail.com

puts "\n\n"
print "\tLoan Interest Solver";
puts "\n\n"
print "\tEnter Principal Amount PHP  : ";
principal = gets;
print "\tEnter No. of Years          : ";
time = gets;
print "\tEnter Percent Rate %        : ";
rate = gets;

principal = principal.to_f;
time = time.to_f;
rate = rate.to_f;

solve_interest = (principal * time * rate) / 100;

print "\n\n";
print "\tDISPLAY RESULTS";
print "\n\n";
print "\tThe total interest is PHP %.2f for #{time} year(s)." % solve_interest;
puts "\n\n";
print "\tEnd of Program";
puts "\n";



No comments:

Post a Comment