Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

Write a C++ program that prompts the user for numbers from cin. Stop reading numbers when the input value is zero. Display the total of the odd entries and the even entries.

For example:

Entry 1: 34

Entry 2: 87

Entry 3: 10

Entry 4: 72

Entry 5: 26

Entry 6: 64

Entry 7: 0

Odd entries add up to: 70

Even entries add up to: 223

NOTE THAT "odd " and "even" here refer to the position in the list, not whether the data value is odd or even!

Another example:

Entry 1: 22

Entry 2: 33

Entry 3: 44

Entry 4: 55

Entry 5: 66

Entry 6: 77

Entry 7: 88

Entry 8: 99

Entry 9: 11

Entry 10: 0

Odd entries add up to: 231

Even entries add up to: 264

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M92292560
  • Price:- $20

Priced at Now at $20, Verified Solution

Have any Question?


Related Questions in Computer Engineering

Identify and evaluate at least three considerations that

Identify and evaluate at least three considerations that one must plan for when designing a database. Suggest at least two types of databases that would be useful for small businesses, two types for regional level organi ...

Suppose you want to represent graphs where the number of

Suppose you want to represent graphs where the number of nodes is unknown in advance, and the nodes IDs are arbitrary (not contiguous). You want the following operations to be performed efficiently: Add a node. Remove a ...

Question suppose that have been asked to investigate

Question : Suppose that have been asked to investigate several password-protected files and other files with headers that do not match the extension. Discuss how you would proceed in your investigation of these files. Th ...

What is the relation between z-score confidence interval

What is the relation between Z-score, confidence interval, t-statistic, p-score and hypothesis testing?

Referring to the slides from text book chapter 5 there are

Referring to the slides from text book, Chapter 5, there are two versions of Fibonacci number calculators: BinaryFib(n) and LinearFibonacci(n). The first algorithm has exponential time complexity, while the second one is ...

Stuck in the mud is a popular dice game in uk the game uses

Stuck in the mud is a popular dice game in UK. The game uses five (5) 6-sided dice to play. The players play in turns. Choose one player to start the game. The player will roll all five (5) dice. If the player rolled any ...

Qion leadership paradox and inter-team relationsa

Question: Leadership Paradox and Inter-team Relations A. What is the leadership paradox? Give some reasons why a leader can encounter difficulty in newly formed teams or groups using a participative management system. Su ...

A supermarket awards coupons depending on how much a

A supermarket awards coupons depending on how much a customer spends on groceries. For example, if you spend $50, you will get a coupon worth eight percent of that amount. The following table shows the percent used to ca ...

Question when setting quotas for disk space what are the

Question : When setting quotas for disk space, what are the two tools for enabling and configuring quotas? And which of the two are the more flexible? When creating a new share, what is the configuration option that enab ...

State the required answer precisely and then provide proper

State the required answer precisely and then provide proper explanation. It is not enough to provide one- word or one-line answers. Provide examples and state precisely the meaning of the following features supported by ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As