Enable the user to input a series of non-negative numbers

Assignment Help Basic Computer Science
Reference no: EM13895224

Write a program that will enable the user to input a series of non-negative numbers via an input statement. At the end of the input process, the program will display: the number of odd numbers and their average; the number of even numbers and their average; the total number of numbers entered. Enable the input process to stop by entering a negative value. Make sure that the user is advised of this ending condition.

For extra credit(needs to be separate program)

Modify the program so that the user cannot enter more than 20 values, If the user does reach this maximum number of values,  have the program print a warning message to the effect, while modifying the message indicating the number of values entered to read: "You entered the maximum number of values." To help the user know which value he/she is entering, have the current count displayed as part of the input prompt ( for example, "Please enter value #7) Don't forget to somehow warn the user at the input stage that the maximum number of values that can be entered is 20.

using visual studio and c++

Reference no: EM13895224

Questions Cloud

Identify one independent variable from the web article : Identify one independent variable from the web article and How is the independent variable you've identified measured (the variable's indicator)?
Assume that selk has a significant influence over kildaire : Selk Steel Co., which began operations on January 4, 2013, had the following subsequent transactions and events in its long- term investments. 2013 Jan. 5 Selk purchased 60,000 shares (20% of total) of Kildaire's common stock for $1,560,000.
What is the crash cost per hour for the given activity : Annie is most interested in reducing the time associated with creating the guest list. What is the crash cost per hour for that activity?
Compare and contrast islamic calligraphy at alhambra : Considering that calligraphy and mosaic are visual representations of religious belief, compare and contrast Islamic calligraphy at Alhambra and Dome of the Rock to Christian mosaics at Ravenna. What do you think each art form communicates about t..
Enable the user to input a series of non-negative numbers : Write a program that will enable the user to input a series of non-negative numbers via an input statement. At the end of the input process, the program will display: the number of odd numbers and their average; the number of even numbers and their a..
How can one implement a queue based using a single stack : How can one implement a queue based using a single stack?
Determining the estimated population variance : The result for University X was a mean of 5 hours and an estimated population variance of 2 hours; for University Y, M = 4, S2 = 1.5; and for University Z, M = 6, S2 = 2.5. Using the 5 steps of hypothesis testing listed below, what should you conclu..
Review the joint commission standards : Review The Joint Commission standards for the type of health care organization that you chose in Week 1 and that you have used throughout this course
Doering company, a u. s. corporation with customers : Doering Company, a U. S. corporation with customers in several foreign countries, had the following selected transactions for 2013 and 2014. 2013 Apr. 8 Sold merchandise to Salinas & Sons of Mexico for $ 5,938 cash.

Reviews

Write a Review

 

Basic Computer Science Questions & Answers

  Pi requests a unit of ri and a unit of r3

pi requests a unit of Ri and a unit of R3.

  Algorithm for taking out heavier marbles

You have eight marbles and a two-pan balance. All the marbles weigh the same, except for one, which is heavier than all the others. The marbles are otherwise indistinguishable.

  Examine the interview structure presented in the sequencing

Examine the interview structure presented in the sequencing

  Calculate and output the mean and median of collected data

Design a program that will allow some number of grades (up to a max of 100) to be input by the user. After the data has been collected, your program should calculate and output the mean and median of the collected data, as well as the sorted grade..

  What is wrong with the following declaration?

What is wrong with the following declaration?

  Analyze the use of gestures in ipads

Analyze the use of gestures in iPads. Address how users feel about gestures. Evaluate how users feel about the user input when it comes to filling out complicated forms on the iPad.

  Requirements for the corporate computing function

Your new corporate CIO has devised a nine-point mission statement for the company. As one of the operations managers in the department, you have received a memo on the new policy and an associated task.

  What is the function of secondary storage

What is the function of secondary storage? Describe three types of secondary storage media, and describe the advantages and disadvantages of each type.

  Recognize and explain six basic computer operations

Recognize the six basic computer operations. Describe each operation's role in computer program and indicate whether it is part of program's input component,

  Calculating value of revenue by using formula

Define Header files.  Define test()function.Declare revenue() function.Declare predict() function.Declare roundMoney() function.

  How byod is utilised and its associated risks

Conduct an Internet search to gather relevant background information of BYOD - how BYOD is utilised and its associated risks

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