Computer Science, asked by prateeks115, 9 months ago

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

Answered by Equestriadash
9

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:

\tt Enter\ the\ principal\ amount:\ 8000\\\\Enter\ the\ number\ of\ years:\ 9\\\\Enter\ the\ type\ of\ account\ [C/SB]:\ C\\\\Your\ rate\ of\ interest\ is\ 8.5%.\\\\

\tt Enter\ the\ principal\ amount:\ 8000\\\\Enter\ the\ number\ of\ years:\ 9\\\\Enter\ the\ type\ of\ account\ [C/SB]:\ SB\\\\Your\ rate\ of\ interest\ is\ 6.5%.\\\\

Flowchart:

                                      \sf User\ inp uts\ the\ principal\ amount

\Biggdownarrow                                                              \Bigg\downarrow

                                       \sf User\ inp uts\ the\ number\ of\ years

                                                             \Bigg\downarrow

                                       \sf User\ inp uts\ the\ type\ of\ account

                                                             \Bigg\downarrow                                    

                                                 \swarrow\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \searrow    

                                               \sf C\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ SB

                                               \Bigg\downarrow\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \Bigg\downarrow

                                             \sf 8.5\% \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ 6.5\%

Similar questions