Float | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
- 1

Float

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

15th Feb 2022, 9:39 PM
Crystal Peter
1 Resposta
+ 1
You haven't written what your problem is. Also, which language are you using (put that in the tags). Are you not able to calculate 20% of a total? There are guides online. The 20% would be your float variable. Multiply that by the input "bill amount" and output that.
15th Feb 2022, 10:31 PM
Ausgrindtube
Ausgrindtube - avatar