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

How do we say I am 17 years old in French?
What is the range of the given function? A.{x | x = –5, 1, 4, 6} B.{y | y = –7, –1, 0, 9} C.{x | x = –7, –5, –1, 0, 1, 4, 6, 9} D.{y | y = –7, –5, –1, 0, 1, 4,
I need help is it A B C or D
A car of mass 960 kg is free-wheeling down an incline at a constant speed of 9.0 m s–1. The slope makes an angle of 15° with the horizontal. Deduce that the av
What is two thousand eight hundred thirty five divided by twenty one?
What is it called when particles travel from an area of high consentration to an area of low consentration?
The time of greatest international influence for the soviet union came
Why must scientists cut a thin slice from a biological specimen before they can do it under a microscope?
If x equals 3 calculate the value of 2x squared plus x
Under what circumstances might conformity be wise? When might it be foolish?