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

  Create e-r diagram for sell and buy of antiques

Create E-R diagram for following situation (state any assumptions you believe you have to make to develop diagram): XYZ Antiques buys and sells one-of-a kind antiques of all kinds

  Program to display weekly payroll report

Write down a program to display a weekly payroll report.

  Design a flowchart displays item-s data

Design a flowchart or pseudocode for the following: displays the item's data only if it is a best-selling item. Best-selling items are those that sell more than 2000 pounds per month.

  Describe how to create users for sales organization unit

Describe how you would create users for sales organization unit and how you can set up user groups in this particular situation (global, universal, domain local).

  Create program to calculate and display number of miles

Create a program to calculate and displays the number of miles per hour over the speed limit that a speeding driver was doing. The program should ask for the speed limit and the drivers speed.

  Program to track which user is logged onto which computer

Write a computer program that could be used to track, by lab, which user is logged onto which computer.

  Write program to use text file to create relative file

Write a program that uses the text file to create a corresponding relative file. Translate the stock code to an appropriate relative record address.

  Draw application which reads inventory records file

Draw an application which reads inventory records file and produces a report whihc show item-number, item-description, and price of every item on each day, one through 7.

  Develop logic for program to allow to enter household size

Develop the logic for a program that allows a user to enter each household size and determine the mean and median household size in marengo.

  Estimate the storage space for telephone book

Estimate the storage space (number of bytes) required for each of the following items: A telephone book with 10,000 entries consisting of names, addresses and phone numbers. Use your phone book to estimate the average length of an entry.

  Write html form that prompts user to enter value

Write an HTML form that prompts the user to enter a value. In PHP, write a script to determine whether the value contains an integer , a decimal-place number.

  Give greedy algorithm to get all n people across bridge

Give a greedy algorithm to get all these n people across the bridge in a fastest way. Describe the algorithm briefly. Prove the correctness.

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