1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
alina1380 [7]
3 years ago
9

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

Computers and Technology
1 answer:
Anuta_ua [19.1K]3 years ago
5 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.");
You might be interested in
Out of a list of the values 8, 3, 30, 5, 15, and 6, what result would the MIN function return?
kondor19780726 [428]
Probably the minimum number in the given set so 5.
6 0
3 years ago
Read 2 more answers
The Zapper gun was an accessory for which game console?
Vladimir [108]
Nintendo Entertainment System
5 0
3 years ago
Read 2 more answers
Which of the following refers to a combination of hardware and software that ensures only authorized individuals gain entry into
MrRa [10]

Answer:

B. Firewall

Explanation:

Firewall, just like encryption prevents unauthorized entry into a computer. However, Firewall can be implemented in both hardware or software form; or even a combination of both.

7 0
3 years ago
Which of the following is true of a bit in data storage?
Trava [24]

Answer:

You didn't give any choice as it looks a multiple choice question

6 0
3 years ago
Suppose that you are asked to modify the Stack class to add a new operation max() that returns the current maximum of the stack
Advocard [28]

Answer:

Following are the code to the given points:

Explanation:

For point 8.1:

public String max()//defining a method max

{

   String maxVal=null;//defining a string variable that holds a value

   for(int x=0;x<n;x++)

   {

       if(maxVal==null || a[i].compareTo(maxVal)>0)//defining if blok to comare the value

       {

           maxVal=a[i];//holding value in maxVal variable

       }

   }

   return maxVal;//return maxVal variable value

}

For point 8.2:

public void push(String item)//defining a method push that accepts item value in a parameter

{

       a[n]=item;//defining an array to hold item value

       if(n==0 || item.compareTo(maxVals[n-1])>0)//use if to comare item value

       {

               maxVals[n]=item;//holding item value in maxVals variable

       }

       else

       {

               maxVals[n]=maxVals[n-1];//decreasing the maxVals value

       }

       n++;//incrementing n value

}

public String pop()//defining a method pop

{

       return a[--n];//use return value

}

public String max()//defining a method max

{

       return maxVals[n-1];//return max value

}

  • In the first point, the max method is declared that compares the string and returns its max value.
  • In the second point, the push, pop, and max method are declared that works with their respective names like insert, remove and find max and after that, they return its value.
7 0
3 years ago
Other questions:
  • What was the han dynasty and the roman empire known for?
    5·1 answer
  • Remember for a moment a recent trip you have made to the grocery store to pick up a few items. What pieces of data did the Point
    15·1 answer
  • What should be included as part of the approval process? in relation to computer forensics
    14·1 answer
  • you are the manager of a virtual team that is working on a project. You uploaded a Word document to an OneDrive account that you
    9·1 answer
  • Text can be easily moved from one location to another using _____.
    15·1 answer
  • PLEASE HELP! One of the nice byproducts of joining a club, organization, community service project, or service learning project
    6·1 answer
  • In batch operating system three job J1 J2 and J3 are submitted for execution each job involes an I/O activity a CPU time and ano
    13·1 answer
  • When power is completely removed from your computer
    11·1 answer
  • What can be used to help diagnose and fix network connection problems?
    8·1 answer
  • How does social network use message to entertain?
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!