principal = 10000

rate = 6

terms = 2

compound interest = pow( 10000 * ( 1 + ( 6 / 100 ) ), 2 ) - 10000

compound interest = 112350000

simple interest = ( 10000 * 2 * 6 ) / 100

simple interest = 1200

compound interest = 112350000

simple interest = 1200

difference = 112350000 - 1200

difference = 112348800

where,

CI = compound interest

P = principal

r = rate

n = terms

SI = simple interest

d = difference

tc = total cost

m = margin

mp = margin percentage

emi = emi