### Dice Rolls

Write a program to solve programming exercise 26 on page 302 which creates a dice rolling simulator. Call it hw4aABC.cpp where ABC is your initials. You will need to review section 6.5Random Numbers to create the program. Be sure to create an output file to report the results of the test. Simulate 25 rolls of the dice and report the number of times each value is reported. You must set a new seed value using srand() as described in the section and shown in the chapter examples. A way to set it to a new value continuously is to use the computer clock and this will involve additional investigating online! Modify the problem statement by reporting the percentage of all rolls of the dice (when the sum of the 2 dice is 2,3,4..11, 12) not just the number of times the sum eight is returned as stated in the textbook.

Note: If you increase the number of rolls in your program you should see the percentages approach the actual probabilities of seeing a roll. For example you have a 1 in 36 chance to roll a 2 or a 12 total.

### Timber Calculation

To design a square timber column in a structure, three formulas must be satisfied:

Maximum load = (.3 x E x Area) / (Length / Width)^2

Compressive stress:

Maximum load = Area x Maximum compressive strength

Slenderness limit:

Length / Width <= 50

where :

E = the modulus of elasticity = 1,700,000 lb/in2
Area = the cross sectional area in square inches
Maximum compressive strength = 445 lb/in2

for a Douglas Fir tree.

Write a program called hw4bABC.cpp where ABC is your initials that uses these three formulas to give an initial design to a structural engineer. Assume the columns to be used are square in cross-section and are available in intervals of 2 inches (i.e. 2 by 2, 4 by 4, 6 by 6 and so on). Have the output look like the following: