What is the energy of the photon that, when absorbed by a hydrogen atom, could cause...

What is the energy of the photon that, when absorbed by a hydrogen atom, could cause the following?

(a) an electronic transition from the n = 3 state to the n = 6 state

(b) an electronic transition from the n = 3 state to the n = 8 state

In: Physics

C language · Pointers · Dynamic memory allocation · Functions · Arrays (dynamically allocated) ​ PROBLEM:...

C language

· Pointers · Dynamic memory allocation · Functions · Arrays (dynamically allocated) ​

PROBLEM:  The user of your program will use it to do some elementary calculations for an unknown number of simple data sets. The data in each set consists of a number of floating point values, but the number of
the values to be entered will be input by the user, so you do not know in advance how many values there will be in each data set. Therefore, you cannot use a static array in C to store these numbers, because a statically declared array has a fixed size, which cannot be changed after the program begins running.

First, you should prompt the user to enter the number of data sets. The user will enter an integer greater than 1 to indicate the number of data sets.

You should then prompt the user to enter the number of floating point values in each data set (which the user will enter as an integer greater than 0), followed by the floating point values themselves on the same line (newline will follow the last floating point value on the line). Your program needs to read the user input, and store the floating point values in each data set in a dynamically allocated array of the appropriate size.

After getting the values in each data set, your program should repeatedly do the following two things:

 Select the data set to do operations on by number, with the following prompt:

Enter the number of the data set on which you wish to do calculations:


The user will enter an integer value, followed by newline, in response to this prompt (the user will enter 1 for the first data set, 2 for the second, etc.), and based on the value entered, your program must be able to access the values in the appropriate data set in the dynamically allocated storage which you have created, and then do what is described immediately below.

 Your program should then prompt the user to choose one of the following options for a calculation based on the data set chosen by the user (ask the user to enter one of the six numbers, followed by enter):

1. Find the minimum value.

2. Find the maximum value.

3. Calculate the sum of all the values.

4. Calculate the average of all the values.

5. Print the values in the data set.

6. Exit the program.

After the user selects one of these six options, your program should do the necessary calculation or printing of the data based on the user's choice (or terminate the program), and output the result with an appropriate message, for example:

The maximum value in the data set is: 569.45
The results for options 1, 2, 3, and 4 should be printed out as floating point values with 2 digits of precision, and the result for option 5 should be to output the values in the data set in the order in which they were input, with two digits of precision for each value, and with any two values separated by a tab (\t).

Sample Data Set Input (This does not include user responses to the prompts to select a data set or to select an operation to perform)

6

3.45 2.37 85.32 34.5 569.45 335.2 193.4 74.39

6 23.45 32.37 185.32 364.5 179.4

144.39 7 35.45 121.47 42.32 44.5

249.75 385.9 113.4 4 44.45 567.37 311.32

22.45 2.37 85.32 34.5 569.45

335.2 193.4 74.39 122.45 413.2 89.32

2

1

3

2

4

3

5

4

6

5

6

In: Computer Science

Drawing on your knowledge of the theory of specialisation and exchange – supplemented by appropriate media...

Drawing on your knowledge of the theory of specialisation and exchange – supplemented by appropriate media reports – explain what the consequences of rising energy costs will be for heavy industry in Australia. with relevant graphs and around 2500 words

In: Economics

Using the predicate symbols shown and appropriate quantifiers, write each English statement as a predicate wff....

Using the predicate symbols shown and appropriate quantifiers, write each English statement as a predicate wff. (The domain is the whole world.) (

A(x): x is an animal B(x): x is a bear H(x): x is hungry W(x): x is a wolf

a. Bears are animals.

b. Some animals are hungry bears.

c. No wolf is a bear.

In: Computer Science

Lowincomesville is a poor town. The mayor has decided to impose a law to cut all...

Lowincomesville is a poor town. The mayor has decided to impose a law to cut all rental rates on apartments in half and to fix them at this level.

What did the mayor implement? Will this help the poor? Why or why not? Be sure to distinguish between the short run and the long run

In: Economics

What could happen if cells remain in the cell cycle indefinitely?

What could happen if cells remain in the cell cycle indefinitely?

In: Anatomy and Physiology

How would comprehensive security differ from realism? Which do you think would be better? Why?

How would comprehensive security differ from realism? Which do you think would be better? Why?

In: Economics

Analyze a simple model of a consumer's response to a price increase. % change (growth rate)...

Analyze a simple model of a consumer's response to a price increase.

% change (growth rate) = (valuenew - valueold) / valueold Elasticity = |% change in quantity / % change in price|

Gasoline

Year 1

Year 2

Price

$1.74

$2.67

Quantity

1,558.55

743.54

a. For the following questions, assume that the Year 2 price increases by an additional 30%.What would be the new Year 2 price after the additional price increase? Answer

b. Given the previously calculated price elasticity of demand, what quantity would the consumer purchase in Year 2 after the price increase? Answer

c. What would be the consumer's expenditure in Year 2 after the price increase? Answer

d. What is the change in the consumer's expenditure between Year 1 and Year 2 by Answer

e. Would a tax on this good be relatively more effective at raising revenue, or changing behavior? AnswerChanging BehaviorRaising RevenueBoth

In: Economics

JAVA PROGRAMMING source code using appropriate programming style (e.g., descriptive variable names, indenting, comments, etc.). 1....

JAVA PROGRAMMING

source code using appropriate programming style (e.g., descriptive variable names, indenting, comments, etc.).

1. Using the remainder (%) operator, write a program that inputs an integer and displays if the number is even or odd.

B. Write the same program using some other technique without using the remainder (%) operator.

In: Computer Science

in order to be eligible for people how long must an inmate convicted of a nonviolent...

in order to be eligible for people how long must an inmate convicted of a nonviolent crime actually serve

In: Economics

Using a BA example, provide an explanation as to why correlation does not equal causation.

Using a BA example, provide an explanation as to why correlation does not equal causation.

In: Math

what is the concentration of H+ ions after adding 5.41 mL of of 0.816 M NaOH...

what is the concentration of H+ ions after adding 5.41 mL of of 0.816 M NaOH to 65.7 mL of 1.97 M HNO3?

In: Chemistry

A truck is purchased for $40,000. The interest rate is 14%. Consider 2 alternatives. A1: The...

A truck is purchased for $40,000. The interest rate is 14%. Consider 2 alternatives.

A1: The truck is driven for 10 years, and then sold for $6000. Routine maintenance is $600 per year. A $3000 repair occurs in year 8.

A2: The truck is driven for 5 years and then sold for $18000. Routine maintenance is $600 per year. Repairs covered by warranty.

a. Show the money flow for each alternative (use diagram similar to figure 8.5 or table of disbursements /receipts) .

      b. Compute the annual equivalent cost of the $3000 repair that occurs in year 8 of Alternative A1.

c. Calculate the annual equivalent cost of A1 (keeping the truck for 10 years)

d. Calculate the annual equivalent cost of A2 (keeping the truck for 5 years)

In: Economics

What are ways in which businesses pose a threat to the environment? In dealing with environmental...

What are ways in which businesses pose a threat to the environment? In dealing with environmental harm, what should be the guiding principle for businesses?

In: Physics

A 1.00Kg horseshoe at 900°C is put in a 4.00Kg bath of water at 10°C. assuming...

A 1.00Kg horseshoe at 900°C is put in a 4.00Kg bath of water at 10°C. assuming that no energy is lost by heat to the surroundings, determine the total entropy change of the wather + horesehoe system. (HINT think about dQ_r)

In: Physics