Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C# Only: 1. Create a console application that lets you enter a bunch of integers until it has reached the end with CTRL-Z. When the

C# Only:

1. Create a console application that lets you enter a bunch of integers until it has reached the end with CTRL-Z. When the app exits, the app will simply print out the "centered" average of all the values entered. We'll say that the centered average is the mean average of the values by neglecting the largest and smallest values in the array. If there are multiple copies of the smallest value, ignore just one copy, and likewise for the largest value. Use int division to produce the final average. You may assume that the number of inputs is at least 3.

2. Create an application that reads a bunch of non-negative integers line-by-line until a negative integer or the end-of-line (CTRL-Z) has reached. The app will print out the sum of all the fillers that will make all the values entered so far will appear in increasing order, where each value is larger than the previous number. That is each filler is added to each input, such that the numbers will all appear in increasing order (e.g. 1, 2, 3, 10). The only exception is when the element is 0, where the current number and the subsequent numbers will restart from zero.

3. Create a console app that lets you input a sequence of integers until the end of line with CTRL-Z. Each iteration will calculate and display all the averages that have been recalculated (when the logic is satisfied) of all the consecutive and positive numbers on separate lines. Round this average to the nearest 100th with thousands-commas and zero-paddings (i.e. use "N2" format); for example, display 6,666,666.67 but not 6666666.66666... However, this special average must include no more than one smallest number of the consecutive sequence of numbers and no more than one largest number of the consecutive sequence of numbers. That is, the sum cannot contain any repeated number that is either the largest or the smallest number.

4. Create an app that lets you enter a bunc hof integers until the end of line with a CTRL-Z. We will say that a "clump" of these numbers is a series of 2 or more adjacent elements of the same value. The app will simply print out the number that is the count of these clumps.

5. Create an application that lets you enter a list of positive and zero integers. That is, if you enter a negative number or an end of line (CTRL-Z), the application will be terminated. These numbers represent the altitudes. This application will count the number of hills while you are entering a number. A hill is made up of at least three different altitudes, in which these numbers must go up and then come down. Additionally, a plateau (flat surface) can exist on the top of and anywhere on the hill, where all the numbers are the same.

6. Create an application that lets us enter a bunch of positive integers until we have entered a zero or a negative number or end-of-line with CTRL-Z. The app will count and display the number of integer sets, whose last value (which is not the same input as the smallest number) is at least the square of the smallest value entered so far in the set. That is, when the last value satisfying that condition has been identified, we will restart a new set of numbers.

7. Create a console app that reads the number of lines/rows and then a character to be displayed on separate lines. The app will display a trapezoid.

8. Write an app reads two inputs: a character that indicates which pattern to choose ('a' = lower right triangle, 'b' = lower left triangle, 'c' = upper right triangle, 'd' = lower right triangle) and an integer that indicates the number of lines to display. The app will then display the following patterns separately, one below the other. Use for loops to generate patterns. All asterisks (*) should be displayed by a signle statement of the form Console.Write('*'); which causes the asterisks to display side by side. A statement of the form Console.WriteLine(); can be used to move to the next line. A statement of the form COnsole.Write(' '); can be used to display a space for the last two patterns., There should be no other output statements in the app. [Hint: the last two patterns require that each line begin with an appropriate number of blank spaces.

9. Create an application that lets you enter some numbers until youve entered two numbers that are the same or that you have reached the end of line with CTRL-Z. Identify the longest subsequence of in-order numbers for all the numbers youve entered. The app will first print (1) the count of the longest subsequence and then (2) on the following line, the app will display a list of the longest subsequence of in-order numbers on separate lines.

10. Create a console app that can generate numbers that are the sums of the three previous numbers. The numbers will start from -1, 0, and 1.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_step_2

Step: 3

blur-text-image_step3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

Define Administration?

Answered: 1 week ago

Question

Define Decision making

Answered: 1 week ago

Question

What are the major social responsibilities of business managers ?

Answered: 1 week ago

Question

What are the skills of management ?

Answered: 1 week ago

Question

Question What is a Roth 403 (b) plan?

Answered: 1 week ago

Question

Question Can a Keogh plan fund be reached by the owners creditors?

Answered: 1 week ago