1 2 3 4 5 6 7 8 9 10
//chapter 22 Ex 1 clc; clear; close; p=7500; n=2; r=4; amount=p*((1+r/100)^n);//formula for compound interest CI=amount-p; printf("The Compound Interest is Rs. %d",CI);