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]
3 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]3 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
4. Water vapor enters a turbine operating at steady state at 1000oF, 220 lbf/in2 , with a volumetric flow rate of 25 ft3/s, and
hodyreva [135]
Yes i is the time of the day you get to frost the moon and back and then you can come over and then go to hang out with me me and then go to hang out
6 0
3 years ago
A glass bottle washing facility uses a well agitated hot water bath at 50°C with an open top that is placed on the ground. The b
DochEvi [55]

Answer:

do the wam wam

Explanation:

7 0
3 years ago
How are industries related to systems
REY [17]

Answer:

The industrial systems of the future are seen as complex systems, composed of vast numbers of devices, interacting with each other and with enterprise systems continuously.

summary:

they are related because they ARE a system. well, a type.

hope this helps!! :)

7 0
2 years ago
What does the line strung between the batter boards represent?
soldi70 [24.7K]

Batter boards (or battre boards, Sometimes mispronounced as "battle boads") are temporary frames, set beyond the corners of a planned foundation at precise elevations. These batter boards are then used to hold layout lines (construction twine) to indicate the limits (edges and corners) of the foundation.

7 0
2 years ago
Read 2 more answers
Use phasor techniques to determine the impedance seen by the source given that R = 4 Ω, C = 12 μF, L = 6 mH and ω = 2000 rad/sec
Zielflug [23.3K]

Answer:

Z = 29.938Ω ∠22.04°

I = 2.494A

Explanation:

Impedance Z is defined as the total opposition to the flow of current in an AC circuit. In an R-L-C AC circuit, Impedance is expressed as shown:

Z² = R²+(Xl-Xc)²

Z = √R²+(Xl-Xc)²

R is the resistance = 4Ω

Xl is the inductive reactance = ωL

Xc is the capacitive reactance =

1/ωc

Given C = 12 μF, L = 6 mH and ω = 2000 rad/sec

Xl = 2000×6×10^-3

Xl = 12Ω

Xc = 1/2000×12×10^-6

Xc = 1/24000×10^-6

Xc = 1/0.024

Xc = 41.67Ω

Z = √4²+(12-41.67)²

Z = √16+880.31

Z = √896.31

Z = 29.938Ω (to 3dp)

θ = tan^-1(Xl-Xc)/R

θ = tan^-1(12-41.67)/12

θ = tan^-1(-29.67)/12

θ = tan^-1 -2.47

θ = -67.96°

θ = 90-67.96

θ = 22.04° (to 2dp)

To determine the current, we will use the relationship

V = IZ

I =V/Z

Given V = 12V

I = 29.93/12

I = 2.494A (3dp)

7 0
3 years ago
Other questions:
  • Convert 250 lb·ft to N.m. Express your answer using three significant figures.
    6·1 answer
  • To compute the energy used by a motor, multiply the power that it draws by the time of operation. Con- sider a motor that draws
    5·1 answer
  • A 16-lb solid square wooden panel is suspended from a pin support at A and is initially at rest. A 4-lb metal sphere is shot at
    8·1 answer
  • A 15.00 mL sample of a solution of H2SO4 of unknown concentration was titrated with 0.3200M NaOH. the titration required 21.30 m
    12·1 answer
  • 5) Calculate the LMC wal thickness of a pipe and tubing with OD as 35 + .05 and ID as 25 + .05 A) 4.95 B) 5.05 C) 10 D) 15.025
    11·2 answers
  • What is the value of the energy (in Joules) stored by the mobile phone battery (capacity of 1.8 Ah), if it is rated at 3.7 V
    15·2 answers
  • A smoking lounge is to accommodate 19 heavy smokers. The minimum fresh air requirement for smoking lounges is specified to be 30
    11·1 answer
  • An automobile engine consumes fuel at a rate of 22 L/h and delivers 85 kW of power to the wheels. If the fuel has a heating valu
    8·2 answers
  • Describing Tasks for Stationary Engineers Click this link to view O*NET’s Tasks section for Stationary Engineers. Note that comm
    12·2 answers
  • At what times should you use your headlights?
    12·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!