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

what type of monkey starts with an h?
shayla says that one kilometer is equal to one million millimeters. is She correct? explain why?
A rectangle whose perimeter is 80 m has an area of 384 m^2. Find the dimensions of the rectangle.
which fraction shows 32/48 in simplest form
a bottle contains 12 red marbles and 8 blue marbles. A marble is chosen at random and not replaced. Then a second marble is chosen at random. Determine the prob
which fraction shows 32/48 in simplest form
what is 5.71 rounded to the nearest whole number
There were 75 rocks is Boxes A,B, and C. After moving 28 rocks fro Box A to B, 24 rocks from B to C, and 19 rocks from C to A,there was an equal number of rocks
Indicate true or false as to whether the following equation is quadratic 2x-4x+1=0
If the circumference of a baseball is 24 cm what is the volume of the object