input the principalamount, type of account (C for current account or S for SB account) and number of years, and display the amount of interest.Rate of interest for current account is 8.5%and that of SB account is 6.5%. what is the program coading and input,output and flowchartof this question
Answers
The following codes have been written using Python.
Source code:
pa = float(input("Enter the principal amount: "))
years = float(input("Enter the number of years: "))
ta = input("Enter the type of account [C/SB]: ")
if ta == "C":
print("Your rate of interest is 8.5%.")
elif ta == "SB":
print("Your rate of interest is 6.5%.")
Output:
Flowchart: