1 2 3 4 5 6 7 8 9 10 11
//chapter 22 Ex 5 clc; clear; close; rate=5/100; t=3; SIAmt=1200; p=SIAmt/(t*rate); Amt=p*(1+rate)^t; CI=Amt-p; mprintf("The compound interest is Rs.%d",CI);