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
If a front gear had 24 teeth, and a rear gear has 12 teeth:
zubka84 [21]

Answer:

  4 times around

Explanation:

The total number of teeth involved will be the same for each gear. If the front gear is connected to the pedal and it goes around twice, then 2·24 = 48 teeth will have passed the reference point.

If the rear gear is attached to the wheel, and 48 teeth pass the reference point, then it will have made ...

  (48 teeth)/(12 teeth/turn) = 4 turns

4 0
2 years ago
The elevation of the end of the steel beam supported by a concrete floor is adjusted by means of the steel wedges E and F. The b
Wewaii [24]

Answer:

a) P ≥ 22.164 Kips

b) Q = 5.4 Kips

Explanation:

GIven

W = 18 Kips

μ₁ = 0.30

μ₂ = 0.60

a) P = ?

We get F₁  and F₂ as follows:

F₁ = μ₁*W = 0.30*18 Kips = 5.4 Kips

F₂ = μ₂*Nef = 0.6*Nef

Then, we apply

∑Fy = 0   (+↑)

Nef*Cos 12º -  F₂*Sin 12º = W

⇒   Nef*Cos 12º -  (0.6*Nef)*Sin 12º = 18

⇒   Nef = 21.09 Kips

Wedge moves if

P ≥ F₁ + F₂*Cos 12º + Nef*Sin 12º

⇒  P ≥ 5.4 Kips + 0.6*21.09 Kips*Cos 12º + 21.09 Kips*Sin 12º

⇒  P ≥ 22.164 Kips

b) For the static equilibrium of base plate

Q = F₁ = 5.4 Kips

We can see the pic shown in order to understand the question.

7 0
2 years ago
Read 2 more answers
What are the three most common types of relearn procedures?
WITCHER [35]

Answer:

The three types of relearn procedures are auto relearn, stationary and OBD.

Explanation:

In TPMS system, after the direct service like adjustment of air pressure, tire rotation or replacement of sensors etc, is performed then maximum vehicle  often needs TPMS system relearn that needs to be performed.

For performing these relearn procedure, there are mainly three types:

  1. auto relearn
  2. stationary relearn
  3. OBD

After applying the relearn process, the TPMS system will again be in proper function.

8 0
3 years ago
Hãy trình bày các bộ phận chính trong một bộ điều khiển điện tử (ECU) dùng trên ô tô. Cho biết công dụng của từng thành phần.
mestny [16]

Answer:

sorry but I can't understand this Language.

Explanation:

unable to answer sorry

5 0
2 years ago
In an experiment, one selected two samples of copper-silver alloy. One sample has 40 wt% of silver and 60wt% of copper and the o
mote1985 [20]
I belive it’s 3 sorry if it’s wrong
6 0
3 years ago
Other questions:
  • In , the industries with the most complaints to the Better Business Bureau were banks, cable and satellite television companies,
    13·1 answer
  • Consider a cylindrical specimen of some hypothetical metal alloy that has a diameter of 11.0 mm. A tensile force of 1550 N produ
    7·1 answer
  • An aluminium alloy bar of diameter 12.5 mm and length 27 m loaded in uniaxial tension to a force of 3 kN. Determine the length o
    15·1 answer
  • Multiple Choice
    11·1 answer
  • A field sample of an unconfined aquifer is packed in a test cylinder. The length and diameter of the cylinder are 50 cm and 6 cm
    9·1 answer
  • Why is it important to always be wearing a personal flotation device (PFD) when in or around the water?
    9·2 answers
  • How did humans create a space suit without ever going. How did we know spaces conditions?
    5·2 answers
  • A refrigerator operating on the Carnot cycle is used to make ice. Water freezing at 32oF is the cold reservoir. Heat is rejected
    11·1 answer
  • A 5.74 kg rock is thrown upwards with a force of 317 N at a location where the local gravitational acceleration is 9.81 m/s^2. W
    10·1 answer
  • Assume the availability of an existing class, ICalculator, that models an integer arithmetic calculator and contains: an instanc
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!