+ 1

How can I do this project

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

26th Nov 2021, 10:40 PM
Sherif Tharwat
Sherif Tharwat - avatar
3 Answers
+ 3
Please always tag the language you're asking about. https://code.sololearn.com/W3uiji9X28C1/?ref=app
26th Nov 2021, 11:48 PM
Simon Sauter
Simon Sauter - avatar
+ 2
This is copied from question: Explanation: 20% of 50 is 10. To calculate 20% of a given amount, you can multiply the number by 20 and divide it by 100: 50*20/100 = 10.0 So just replace 50 with user input, make sure you work with number not string. If you still dont understand read lections again.
26th Nov 2021, 11:13 PM
PanicS
PanicS - avatar
+ 2
Thank you!
26th Nov 2021, 11:15 PM
Sherif Tharwat
Sherif Tharwat - avatar