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

Please help me out on this thank you
Akhenaten came to power around 1353 BCE in Ancient Egypt and was most well-known for which of the following?
Read the following poem, then answer the question that follows: My beautiful penthouse apartment bursts with pets and plants, but it's far from paradise. My arm
0.25 g na in moles please
50 POINTS!!!A comparison-contrast essay asks you to compare and contrast the features of two similar topics. In this assignment you are asked to compare two dif
What was the effect of anti-Chinese riots and discriminatory acts against Chinese immigrants in the 1880s? A. Rioters who attacked immigrants were put in jail.
Write two mixed numbers that are equal to 7.5
System in which elected officials act in the interest of the people
Name four muscles that compress the abdominal contest
What level of ecology is concerned with groups of individuals of the same species?