Another answer from Apex is... compounding frequency
Draw a flow chart to calculate simple interest with 10% rate if time is greater than 2 yrs otherwise calculate simple interest with 5%.
simple interest = principle (money) times the rate times the time
The simple interest, on an amount Y, at rate r% per year, for t years is I = Y*(r/100)*t But bank interest is always compounded, never simple.
To calculate the simple interest, use the formula: Interest = Principal × Rate × Time. Here, the principal is 3050, the rate is 11.5% (or 0.115), and the time is 7 years. So, Interest = 3050 × 0.115 × 7 = 2,305.75. The simple interest on 3050 at 11.5 percent for 7 years is 2,305.75.
change % to decimal
To calculate an interest (as money), multiply the capital, times the interest rate (divided by 100, if it is expressed in percent), times the number of periods. The above assumes simple interest; compound interest is a bit more complicated.
18.90currency as an interest..
1,773.60
The simple interest over a period of five years is $463.70
56.72
algorithms is language independent
Here's a simple Perl program to calculate simple interest: use strict; use warnings; sub simple_interest { my ($principal, $rate, $time) = @_; return ($principal * $rate * $time) / 100; } my $principal = 1000; # Example principal amount my $rate = 5; # Example interest rate my $time = 2; # Example time in years my $interest = simple_interest($principal, $rate, $time); print "Simple Interest: $interest\n"; This program defines a function to calculate simple interest and then prints the result for given principal, rate, and time values.