fork download
  1. print("SIMPLE INTEREST CALCULATION\n")
  2. print("Enter the following details.")
  3. p = input("Amount: ")
  4. n = input("No. of Years: ")
  5. r = input("Rate of Interest: ")
  6.  
  7. i = p*n*r/100
  8. a = p + i
  9.  
  10. print("\nThe interest is " + str(i))
  11. print("The total amount is " + str(p + i))
Success #stdin #stdout 0s 23352KB
stdin
1000
2
10
stdout
SIMPLE INTEREST CALCULATION

Enter the following details.
Amount: No. of Years: Rate of Interest: 
The interest is 200
The total amount is 1200