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

Dr. Thomas just started an experiment. She will collect data for 6 days. How many hours is this?
Any nonzero integer divided by 0 equals 0. True or false? Justify your answer.
In the united states, jails are operated mainly by what level of government?
some activities that might be carried out privately are in fact conducted by government." Which of the following is an example of this statement? A. enforcing a
simplify (8^3)^7 = 8^n
The part of the endocrine system that regulates the level of sugar in the blood is the _____.
The historical treatment of freud's impact upon psychology is still incomplete because ____.
The nurse and the client are using therapeutic communication skills. which statements are true of concrete and abstract messages? select all that apply.
How many liters of milk are in 334 gal enter your answer In scientific notation
What type of number is square root of prime numbers?