Program to find simple and compound interest
#Program to find simple and compound interest
p= float(input("Enter principal amount: "))
r= float(input("Enter the rate: "))
n= int(input("Enter the time span in years: "))
si= (p*r*n)/100
ci= ((p*(1+(r/100))**n))-p
print("Simple Interest = ", si )
print("Compound Interest = ", ci )
#to print the total amount along with simple interest,
print("Amount with simple interest ",p+si)
#to print the total amount along with compound interest,
print("Amount with compound interest ",p+ci)
Comments
Post a Comment