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

Karen received 2 valentines today. "Wow!" said Karen. "Now I have five times as many as I would have had if I gave away 2 valentines!" How many valentines did K
My first question ever, and my last question yet. Alec and Beau race to compute 1 + 2 + 3 + ... + n. Alec skips two numbers and gets a sum of 92. Beau double-co
Can someone please help me with the square root question?
How do ozymandias and exposure compare (power of nature?
Find the value of x Pls Help
6) In line 24, the word wield means A) carry B) hide C) solve. D) yawn.​
HELPPPPP MEEEEEE PLEASEEEEEE
help did I create a theme or visual unity? How? my art: a bird, lion, flowers, butterfly
Help me for my LRI school magazine please and write your own story
What are the pros and cons of internationalism?