sophkeis9025 sophkeis9025
  • 04-07-2017
  • Computers and Technology
contestada

Write a program that computes and displays a 15 percent tip when the

Respuesta :

kaevras
kaevras kaevras
  • 04-07-2017
Your question wasn't very clear, but I think I understand what you want. Additionally, you should really state what language you're working with. Here it is in C#, and shouldn't be too much of a hassle to translate in to other languages.


Console.Write("Enter payment: ");

float payment;

if (float.TryParse(Console.ReadLine(), out payment))
    Console.WriteLine((Math.Floor(payment * 100) / 100) * 0.15, + " at 15% tip.");
else
    Console.WriteLine("Invalid input.");
Answer Link

Otras preguntas

Why is it important to round off the decimals?
15x + 5 = 50 Please help!
Read the excerpts from a biography and a memoir about fictional news anchor Melanie Waters. First, identify a way in which both accounts are similar. Then, expl
chellofffffffffffffffffffffffffffffffff
help pls would it be A or D?
HELP 40 POINTS!!! Which text feature previews the paragraph that follows? Image Sidebar Subheading Title
A local watershed carries runoff from farms, suburban lawns, and wastewater treatment plants into local rivers, and eventually into a local bay. How could this
30. Quickly now, what is the sum of all integers from 1 to 100?.
What was built to connect mainland Florida to the Florida keys ?
I hate my life please oh what am I dong no one answer's this: Excerpt from A Change of Plans Rasheida Gomez 2Just then a loud clap of thunder sounded outside. T