- 1

Could somebody explain to me?

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

18th Apr 2022, 8:01 PM
H.alniil
H.alniil - avatar
3 Answers
+ 5
It's actually fairly simple. You should write a code that outputs 20% of the entered amount. So you want to take an input, let's say 'b' and return 'b * 0.2', which will be 20% of 'b'
18th Apr 2022, 8:17 PM
Aleksei Radchenkov
Aleksei Radchenkov - avatar
+ 4
50 * 20/100 = 10.0
18th Apr 2022, 8:19 PM
Jayakrishna 🇼🇳
+ 1
Ok thanks
18th Apr 2022, 8:19 PM
H.alniil
H.alniil - avatar