Write program which asks user for number of bolts

Assignment Help Programming Languages
Reference no: EM1372810

A hardware store charges 4 cents for nuts and 6 cents for bolts.
Write a C++ program that asks the user for the number of bolts and number of nuts in their purchase and then calculates and prints out the total cost.

As an added feature, the program should check the order. It is usually a mistake if there are more bolts than nuts. If that is the case, the program should display the message "Check the Order!" If the number of nuts and bolts are the same, the program should instead display "Order is OK." In either case, the total cost is written out.

Reference no: EM1372810

Questions Cloud

Write program to calculate and output tuition : Write a C++ program to calculate and output tuition. Prompt user for number of credits taken and type of classes ('U' for undergraduate - $380 per credit hour, or 'G' for graduate.
Game theory and oligopoly : Advanced Micro Devices declared a 10 percent price raise for certain advanced microprocessors, used primarily in video games. The processors will sell for about $1,000 compared to Intel's $950 price.
What is the frictional force acting on disk : The disk would slide off the turntable if it is located at a radius larger than 16 cm from the axis of rotation. What is the coefficient of static friction.
Calculate friction force as it slides down the slope : An 86 Kg person stands on a uniform ladder 4m long, that weighs 70N. The floor is rough; hence, it exerts both a normal force, and a frictional force, on ladder. The wall, on the other hand, is frictionless; it exerts only the normal force. What a..
Write program which asks user for number of bolts : Write C++ program which asks user for number of bolts and number of nuts in their purchase and then computes and prints out total cost.
What should its speed relative to the ground be : The pilot of an aircraft wishes to fly due west in a 49.8 km/h wind blowing toward the south. The speed of the aircraft in the absence of a wind is 192 km/h.
Academic approach to forecasting : Prepare forecasts for the GDP of 2005 using exponential smoothing with smoothing constants of 0.4 and 0.6 - Which of these models has the lowest mean absolute deviation.
Calculating the nash equilibrium : Suppose you have been offered chance to participate in a Treasure Hunt game whose rules are as follows. There are 3-colored boxes: red, green and yellow.
Why to avoid the weight of the logs : assuming the average person has a mass of 68kg? Do not avoid the weight of the logs. Assume the specific gravity of wood is 0.6.

Reviews

Write a Review

Programming Languages Questions & Answers

  Explaining risk in fixed-price contracts

It is recognized that fixed-price contracts offer obvious advantages to buyer organizations because they transfer almost all of the risk to the contractor.

  Program to enter up to 20 integers in the array of long

Write down a program which asks user in order to enter up to 20 integers in the array of longs.The program must utilize the function Find_It() in order to situate the integer within the array.

  Program to compute person-s body mass index

Write a program to compute person's body mass index? Create a modular program which calculates and display person's body mass index (BMI).

  Write lisp function to reverse order of the elements in list

Write a Lisp function that: given a two-element list, reverse the order of the elements in the list (cannot use the LISP reverse function).

  Draw diagram shows occupancy of buffer as function of time

A transmitter with rate R bps serves the buffer by sending the bits whenever available. Draw a diagram that shows the occupancy of the buffer as a function of time, for different ranges of values for R.

  Program with two functions to solve voting problem

Program with at least two functions to solve following problem. Members of board of small university are considering voting for pay increase for their 10 faculty members.

  Write function to compute average temperature for the month

Write the function, print_temps(), with same two parameters plus count of hot days. Print neat table of temperatures. At same time, compute average temperature for the month.

  Design-write program to enter score repetition structure

Design and write a program that asks the user to enter five test scores using a repetition structure. The program should display the letter grade for each score and the average test score at the end of the program.

  Develop procedure to returns recent order information

Develop a procedure that returns the most recent order information for aparticular basket. This procedure must determine most recent stage entry from the BB_BASKETSTATUS table

  Program to simulate rolling one die

Write a program which simulates rolling one die using the following steps: Prompt the user for the number of sides on the die.

  Write pseudocode

Write pseudocode that represents the abstract functions of the enqueue and dequeue operations. Define and explain any supplementary information needed by your pseudocode.

  Creating personnel promotion application program

The following application program will be modified to accommodate the change to the database table. The personnel promotion application program.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd