0

How to solve it : Tip calculator

When you go out to eat, you always tip 20% of the bill amount. But who’s got the time to calculate the right tip amount every time? Not you that’s for sure! You’re making a program to calculate tips and save some time. Your program needs to take the bill amount as input and output the tip as a float. Sample Input 50 Sample Output 10.0

2nd Mar 2022, 10:42 AM
Apu
Apu - avatar
6 odpowiedzi
+ 9
Prakash Dhar , to get help from the community, you should link your code here. thanks!
2nd Mar 2022, 11:16 AM
Lothar
Lothar - avatar
+ 5
Prakash Dhar complete the lessons preceeding the tip calculator and you will have all the tools required to complete the project.
2nd Mar 2022, 12:49 PM
Paul K Sadler
Paul K Sadler - avatar
+ 4
bill = int(input()) print (float(bill*20/100))
3rd Mar 2022, 4:41 PM
Bluegray
Bluegray - avatar
+ 3
(bill/100.f)*20.f
2nd Mar 2022, 11:16 AM
István
+ 3
I tried that and It worked
3rd Mar 2022, 4:43 PM
Bluegray
Bluegray - avatar
0
Coding Berries and Cream what about bil %20
3rd Mar 2022, 4:42 PM
Apu
Apu - avatar