Reference no: EM13763088
Instructions
Ask the user to enter a "magic number," which is an integer between 0 and 9, inclusive.
Then, ask a user to enter 10 integers between 0 and 9, inclusive. (If a user enters an integer outside of that range, therefore invalid, notify the user of the error and ask for him/her to try again. Invalid numbers do not count towards the 10 valid integers requirement.)
NOTE: User input should be done in a repetition structure (loop). Ten sequential input statements will not satisfy the requirements of this assignment.
Your program should output the following:
How many times the user entered the magic number.
The average of all the valid numbers that the user entered.
Sample Output:
What is the "magic number?" 4
Enter a number from 0 to 9: 4
Enter a number from 0 to 9: 1
Enter a number from 0 to 9: 4
Enter a number from 0 to 9: 3
Enter a number from 0 to 9: 7
Enter a number from 0 to 9: 1
Enter a number from 0 to 9: 5
Enter a number from 0 to
Algorithm attributes and their importance.
: Write a 2 page research paper (excluding title and reference pages) on algorithm attributes and their importance. Use two resources (Wikipedia sources are not permitted) and list each resource used at the end of the paper in the reference list sec..
|
Function that returns a token when it is needed.
: A major component of your assignment will be to write a procedure (Function) that returns a token when it is needed. Your lexer should return a record, one field for the token and another field the actual "value" of the token (lexeme), i.e. the in..
|
What were you most surprised to learn from the film
: What were you most surprised to learn from the film? Why did the American government decide to assimilate Native American children into Western culture?
|
Ratio computations and effect of transactions
: Presented below is information related to Carver Inc.
|
Write a cpp program for magic number
: Ask the user to enter a "magic number," which is an integer between 0 and 9, inclusive. Then, ask a user to enter 10 integers between 0 and 9, inclusive. If a user enters an integer outside of that range, therefore invalid, notify the user of the ..
|
Write down the first order necessary conditions
: Write down the Lagrangean for problem and Write down the first order necessary conditions (FOC) for a minimum.
|
What you have learned about children who are gifted
: What you have learned about children who are gifted and talented. What are the special needs of young children who are gifted and talented? What are the special needs of older children?
|
Problems related to astronomy
: What is the approximate wavelength of this signal?
|
Modify the inventory program to include an add button
: Modify the Inventory Program to include an add button, a delete button, and a modify button on the GUI. These buttons should allow the user to perform the corresponding actions on the item name, the number of units in stock, and the price of each ..
|