Integer number from the keyboard

Assignment Help Business Management
Reference no: EM132265314

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: EM132265314

Questions Cloud

Discuss the health-economic and family influence : Discuss the health, economic and family influence? Paper must be 3 to 4 pages in body, font of 12, with at least 4 peer review articles.
Tax based on the old income tax rate : Make an R program to compute the income tax based on the old income tax rate:
Explain autozones strategy : Based on Michael Porter's discussion of the characteristics of an effective strategy, does AutoZone have a good strategy for growth? Explain.
Discussion about the health-promoting behaviors : Globally different cultures have different beliefs in well-being, medicine, and health-promoting behaviors. The Health Belief Model is a theory that individual.
Integer number from the keyboard : 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.
Define the terms agency relationship and agency problem : Define the terms agency relationship and agency problem. Explain three different approaches to minimizing the agency problem.
Installing a 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.
Explain how nursing practice has changed over time : Explain how nursing practice has changed over time and how this evolution has changed the scope of practice and the approach to treating the individual.
Disadvantages of informal organization of social movements : Explain both the advantages and disadvantages of the informal organization of social movements.

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