Ask Question
4 December, 04:03

Write a program that computes and displays a 15 percent tip when the

+3
Answers (1)
  1. 4 December, 06:18
    0
    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.");
Know the Answer?
Not Sure About the Answer?
Find an answer to your question ✅ “Write a program that computes and displays a 15 percent tip when the ...” in 📘 Computers and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers