+ 1

How to solve this friends bill amount is 100 but I should give 20% tip as a float please help me on the same

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

12th Aug 2021, 3:43 AM
Madan Kumar M
Madan Kumar M - avatar
5 ответов
+ 2
First try yourself. In case you face any problem post the code with your question. All the best
12th Aug 2021, 3:51 AM
Nitin Tiwari
Nitin Tiwari - avatar
+ 1
Ok bro I tried many times will try again
12th Aug 2021, 3:54 AM
Madan Kumar M
Madan Kumar M - avatar
+ 1
tip is 20% == 1/5 == 0.2 bill is 100%==1
12th Aug 2021, 6:32 AM
Shadoff
Shadoff - avatar
0
it will be a piece of cake if you know about percentages
12th Aug 2021, 4:09 AM
Rellot's screwdriver
Rellot's screwdriver - avatar
0
The formula for calculating the tip is given in the explanation. All you have to do is get the bill as input, calculate the tip using the formula and print it.
12th Aug 2021, 4:29 AM
Simon Sauter
Simon Sauter - avatar