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

  Explain what it is supposed to be measuring or representing

Explain what it is supposed to be measuring or representing and and why you think it is misleading

  Activities that are associated with the summer olympics

How does global marketing and the use of new digital marketing techniques facilitate marketing activities at the Olympics in Rio?

  Examples to illustrate the argument

What do private art museums do that the public galleries can't? Using at least 2 examples to illustrate the argument. Please make the idea and example be clear and give separate paragraph. Word Count 500. Response from gallery and museum managemen..

  Compare as well as contrast your process with the one that

Compare as well as contrast your process with the one that Palm Desert used. Regulate which approach will yield the best results consistently in the long-run.

  Evaluate how organizational functions influence

Evaluate how organizational functions (such as marketing, finance, human resources, and operations) influence and determine the organizational structure of your selected organization

  Difference between strategies

If yes, what do you believe is the difference between their strategies (why has Target been relatively more successful)?

  When did it become wrong to make a profitwhen did it become

when did it become wrong to make a profit?when did it become wrong to make a profit either domestically or

  Analyze the brand position in its niche

Analyze the brand position in its niche/market as it relates to the four components of brand position in 90- to 175- words.

  Describe gap analysis and it''s importance

A. What are some guidelines that software project teams must follow during the initial planning phase?

  Briefly discuss the bcg growth matrix

Briefly discuss the BCG Growth matrix and the GE Business Screen in terms of how they work and what each one provides.

  Assess his or her understanding and agreement of business

Assess his or her understanding and agreement of the business unit's value proposition, market position, and competitive advantage.

  Why is the reputation of an organization so important

When scheduling production of your products, what were the key factors considered? Why is the reputation of an organization so important?

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