Program that prompts the user for an integer number

Assignment Help Business Management
Reference no: EM132263372

1. Program that prompts the user for an integer number from the keyboard, and store it in a variable num. After each number is typed in, add num to a total.

Repeat five times, each time adding num to a total. (Be sure to reuse the same variable named num for each of the six numbers entered.) When all six numbers have been entered from the keyboard, calculate an average.

Display the total and average calculated.

2. This program requires you to use a loop as well as the switch statement. You will display this menu on the screen.

(Press 8 to stop voting)

The Many Colors of M&M's Candy

1. black

2. yellow

3. brown

4. yellow

5. green

6. White

Vote on your favorite color by pressing the number before it.

In this program, you will keep track of the number of votes for each color of M&M's candy. The user will be able to vote until he/she types the sentinel character 9. Display the menu and ask the user to enter a number. Check the number entered against the numbers 1 - 2 - 3 - 4 - 5 - 6. If the number entered is 1, add one to the redctr. If the user has entered 2, add one to the bluectr, etc.

When the user has pressed the 9 to exit, print out a display telling how many votes each color received.

3. program that includes a function picnic() that will accept a floating-point number total and the addresses of the integer variables hotdogshamburgerssaladpickles. The passed floating-point number represents the total amount of money to be spent on food. The function is to determine the quantity of hotdogshamburgerssalad, and pickles that can be purchased, writing these values directly into the respective variables declared in the calling function.

This function will be called from the main program and when it returns to main, it will print out the values of hotdogshamburgerssalad, and pickles.

Our favorite foods are in this order:

1. hot dogs--$2.00 each

2. hamburgers--$1.50 each

3. salad--$2.25 each

4. pickles--$1.01 each

For example, if I enter a total amount of money of $3.78, I can bring the following items to my picnic:

4 hot dogs

2 hamburger

3 salad

1 pickles

Reference no: EM132263372

Questions Cloud

Explain in detail privacy issues related to the case study : Explain in detail, privacy issues related to the case study. Explain in detail, privacy issues related to the case study.Identify the U.S. citizen privacy law.
Dhcp can also be used as a malicious attack tool : 1. DHCP is a very promiscuous service, and this can cause unplanned service interruptions if not configured properly. Explain.
Creating a visualisation in each of given made-up scenarios : This exercise involves you using imagination and logical reasoning to occupy the mindset of a visualiser facing the task of formulating a brief for different.
Compute the income tax based on the old income tax rate : Make an R program to compute the income tax based on the old income tax rate:
Program that prompts the user for an integer number : 1. Program that prompts the user for an integer number from the keyboard, and store it in a variable num. After each number is typed in, add num to a total.
What are the security risks in database migration : Project is a 12-minute presentation to be presented at the residency. You must select a topic from the list provided in this weeks folder.
Wireless access point in a fitness center : An administrator is installing a wireless access point in a fitness center. There will only be 5 devices that have access to it, and they are all company owned.
Summarizing the content of the article or paper : You should summarize the content of the article or paper and explain how it relates to STRIDE and Threat Modeling. Provide your own assessment of the article.
Give an example of a scenario : Please discuss and give an example of a scenario when it is important to trade space for time and trade time for space in algorithmic design.

Reviews

Write a Review

Business Management Questions & Answers

  Caselet on michael porter’s value chain management

The assignment in management is a two part assignment dealing 1.Theory of function of management. 2. Operations and Controlling.

  Mountain man brewing company

Mountain Man Brewing, a family owned business where Chris Prangel, the son of the president joins. Due to increase in the preference for light beer drinkers, Chris Prangel wants to introduce light beer version in Mountain Man. An analysis into the la..

  Mountain man brewing company

Mountain Man Brewing, a family owned business where Chris Prangel, the son of the president joins. An analysis into the launch of Mountain Man Light over the present Mountain Man Lager.

  Analysis of the case using the doing ethics technique

Analysis of the case using the Doing Ethics Technique (DET). Analysis of the ethical issue(s) from the perspective of an ICT professional, using the ACS Code of  Conduct and properly relating clauses from the ACS Code of Conduct to the ethical issue.

  Affiliations and partnerships

Affiliations and partnerships are frequently used to reach a larger local audience? Which options stand to avail for the Hotel manager and what problems do these pose.

  Innovation-friendly regulations

What influence (if any) can organizations exercise to encourage ‘innovation-friendly' regulations?

  Effect of regional and corporate cultural issues

Present your findings as a group powerpoint with an audio file. In addition individually write up your own conclusions as to the effects of regional cultural issues on the corporate organisational culture of this multinational company as it conducts ..

  Structure of business plan

This assignment shows a structure of business plan. The task is to write a business plane about a Diet Shop.

  Identify the purposes of different types of organisations

Identify the purposes of different types of organisations.

  Entrepreneur case study for analysis

Entrepreneur Case Study for Analysis. Analyze Robin Wolaner's suitability to be an entrepreneur

  Forecasting and business analysis

This problem requires you to apply your cross-sectional analysis skills to a real cross-sectional data set with the goal of answering a specific research question.

  Educational instructional leadership

Prepare a major handout on the key principles of instructional leadership

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