Monday, July 26, 2021

Simple Interest in AngularJS

 Machine Problem


Write a program  to ask the user to give principal amount, time, and rate to calculate the simple interest.   Use the following formula below.

Formula:

SI = (P * T * R) / 100

Where:

P = principal amount

T = time

R = rate

SI = simple interest

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 at the following email address for further details.  If you want to advertise on my website, kindly contact me also at my email address also. Thank you.

My email address is jakerpomperada@gmail.com and jakerpomperada@yahoo.com

My mobile number here in the Philippines is 09173084360.






Program Listing

<!-- index.htm
  Author   : Prof. Jake Rodriguez Pomperada, MAED-IT, MIT
  Date     : July 20, 2021  Tuesday   10:12 PM
  Place    : Bacolod City, Negros Occidental
  Websites : www.jakerpomperada.com and www.jakerpomperada.blogspot.com
  Email    : jakerpomperada@gmail.com
 -->
<html>
<head>
<title>Simple Interest in AngularJS</title>
</head>
<style>
body {
font-family: arial;
font-size: 25px;
font-weight: bold;
}
</style>
<script type="text/javascript" src="angular.min.js">
</script>


<div ng-app ng-init="principal_amt=0;time=0;interest_rate=0">
<form>
<table border="0" cellspacing=10>
<tr>Simple Interest in AngularJS</tr>
<tr>
<td>Enter Principal Amount </td>
<td><input type="number"  ng-model="principal_amt" ></td>
</tr>
<tr>
<td>Enter Time (ex. 1 for 1 year) </td>
<td><input type="number" ng-model="time" ></td>
</tr>
<tr>
<td>Enter Interest Rate </td>
<td><input type="number"  ng-model="interest_rate" ></td>
</tr>
<table>
</form>
<p>Simple Interest is PHP  {{ (principal_amt * time * interest_rate) / 100 | number : 2}}. </p> 
</div>
</body>
</html>

No comments:

Post a Comment