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

Which layer of a tropical rainforest receives the least sunlight? a. the top canopy b. the second layer of the canopy c. the third layer of the canopy d. the
No guessing please help no direct answer please help understand Peyton earned simple interest on $12,550 with an annual interest rate of 2.7% for 5 years. How m
(5x - 18) + (4x + 7) = 180 what is the value of x?
What is the name of the sentence that makes a demand?
Constantine was the first Muslim, Christian, Orthodox, or Hindu ruler of Rome.
Which theorist believed that the ego"wore a mask, or persona "?
bag of potatoes weighs 5 pounds the bag is placed on a scale the unit on the scale is ounces what weight does the scale show
How long is it from 10 at night until 5 in the morning?
Presidential candidates often choose a running mate who can ____ by virtue of certain characteristics.
When was the first gasoline-powered American automobile made?