Back

i wrote a program to calculate simple interest but showing error

Created 3 years ago
898 Views
2 Comments
TMHfxPz
@TMHfxPz
TMHfxPz
@TMHfxPzProfile is locked. Login

You are given with Principle amount($), Interest Rate(%) and Time (years) in that order. Find Simple Interest.

Print the output up to two decimal places (Round-off if necessary).

(S.I. = P*T*R/100)

Input Description:
Three values are given to you as the input. these values correspond to Principle amount, Interest Rate and Time in that particular order.

Output Description:
Find the Simple interest and print it up to two decimal places. Round off if required.

Sample Input :
1000 2 5
Sample Output :
100.00

p,t,r=map(int,input().split(" "))

si=(p*t*r)/100

simple = "{:.2f}".format(si)

print(simple)

Comments (2)
Please login to comment.