1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Over [174]
4 years ago
5

Type a statement using srand() to seed random number generation using variable seedVal. Then type two statements using rand() to

print two random integers between (and including) 0 and 9. End with a newline. Ex: 5 7 Note: For this activity, using one statement may yield different output (due to the compiler calling rand() in a different order). Use two statements for this activity. Also, after calling srand() once, do not call srand() again. (Notes)

Engineering
1 answer:
liq [111]4 years ago
4 0

Answer:

View Image

Explanation:

No number is really ever random. It all has a seed, which is an initial value for the 'random' number to be generated. The rand() function uses an equation to  generate its value, and all its 'random' value depend on the first number you plug in into your equation. The initial number you plug into your equation is what srand() do.

If you just call rand() alone without calling srand() then the generated numbers will automatically use srand(1) as a default seed. Using the same srand() value will always yield the same sequence of numbers.

To get a number between 0 and 9, take the modulus of it with 10 because modulus give you the remainder, so the number rand()%10 will never be equal to 10 or greater.

You might be interested in
A capillary tube is immersed vertically in a water container. Knowing that water starts to evaporate when the pressure drops bel
REY [17]

Answer: 10.12m, 20micro meter

Explanation:

8 0
3 years ago
Explain the difference, on the basis of the test results, between the ultimate strength and the "true" stress at fracture.
gayaneshka [121]

Answer / Explanation:

On the basis of the test result, Ultimate strength which is mostly known as the ultimate tensile strength is the strength attached to the ability or capacity of a structural element or material used in the test to withstand elongation forces or pull force applied to it.  

WHILE,

True stress at fracture can be classified as stress or load associated to the point where yielding or fracture occurred divided by the cross-sectional area at the yield point.

5 0
3 years ago
Storing parts outside doesn't cause any environmental risks as long as the items are covered.
telo118 [61]

Answer:

False

Explanation:

3 0
3 years ago
Read 2 more answers
You plan to install an active, liquid-based solar heating system for hot water. There are four candidate collector systems. Your
olchik [2.2K]

Solution:

The given formula,

x=F_{R} U_{L} \times \frac{P l}{F R_{1}} \times\left(T_{r e f}-\bar{T}_{a}\right) \Delta t \times \frac{A_{c}}{L}

y=F_{R}(\tau \alpha)_{n} x \frac{F_{R}^{\prime}}{F_{R}} \times \frac{(\bar{\tau} d)}{(T d)_{n}} \times \bar{H}_{T} N \times \frac{A C}{L}

\frac{x}{y}=\frac{ u_{L} \times\left(T_{x t}-\bar{T}_{a}\right) \times \Delta t}{\left(\tau_{x}\right)_{h} \times\left(\frac{\bar{\tau}_{d}}{\left.| \tau_{d}\right)_{n}}\right) \times \bar{H}+N}

From the table,

1) \(\quad x=2 \cdot 87, \quad y=0.96\)\\\(\frac{x}{y}=\frac{2187}{0.96}\)22895\\\\2) \(x=3 \cdot 466 \cdot y=6 \cdot 998\)\\\(\frac{x}{y}=\frac{3 \cdot 466}{0.898}\)\(=3 \cdot 4729\)

3\(x=3 \cdot 229, y=1 \cdot 08\)\\\(\frac{x}{x}=\frac{3 \cdot 229}{1 \cdot 08}\)\\=2.9898\)\\\\4) \(x=6.525, y=1.094\)\\\(\frac{x}{y}=\frac{5.625}{1.094}\)\\=5.0502

8 0
4 years ago
The 5 ft wide gate ABC is hinged at C and contacts a smooth surface at A. If the specific weight of the water is 62.4 lb/ft3 , f
pochemuha

Answer:

The solution is given in the attachments.

5 0
3 years ago
Other questions:
  • What are the main factors for the high material removal rate in broaching operations?
    9·1 answer
  • The difference between absolute viscosity and kinematic viscosity is a. the absolute viscosity is the mass density divided by th
    10·1 answer
  • John’s engineering team has just finished testing prototypes. What should be their next step in the design process?
    5·1 answer
  • On a ruler or tape measure, what is the distance from 1 3/8 to 3 1/2?​
    11·1 answer
  • What is the increase of entropy principle?
    7·1 answer
  • A three-phase, 318.75kVA, 2300-Volt, alternator has an armature resistance of 0.35/phase and a synchronous reactance of 1.2/phas
    10·1 answer
  • Describe how analog electronics is applied in using the photocopier or old land-line
    13·1 answer
  • An insulated rigid tank is divided into two compartments of different volumes. Initially, each compartment contains the same ide
    11·1 answer
  • Simplify the expression below:<br><br> 313 + 12 =
    13·2 answers
  • (5 points) Which of the following circuits may not be used to determine the value of the resistor? Circle all that apply.
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!