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
You are approaching an intersection on a multiple-lane road, and you want to change lanes;
Ipatiy [6.2K]

Answer:

The correct answer is B

Explanation:

On a multiple lane roadway that has a speed limit of 50 mph (that is 80.5kmh) or greater, a driver is legally required to signal his or her intention to change lanes at least 300 feet   in advance of making the change.

This rule like other traffic rules is design to ensure the safety of other road users by preventing accidents which may stem from reckless driving.

Cheers!

7 0
3 years ago
Read 2 more answers
Wheel diameter 150 mm, and infeed 0.06 mm in a surface grinding operation. Wheel speed 1600 m/min, work speed 0.30 m/s, and cros
gogolik [260]

Answer:

a) the average length per chip is 3 mm

b) the metal removal rate MR is 90 mm³/sec

c) number of chips formed per unit time for the portion of the operation when the wheel is engaged in the work is 4,000,000 chips/min

Explanation:

Given that;

wheel diameter = 150 mm

infeed = 0.06 mm

wheel speed = 1600 m/min = 16000000 mm/s

work speed = 0.30 m/s = 300 mm/s

cross feed = 5 mm

active grits per area = 50 grits/cm²

a)

Average length per chip

Average chip length is given by

Lc = √fd

f is infeed and d is diameter of the wheel

so we substitute

Lc = √( 0.06 × 150

Lc = √ 9

Lc = 3 mm

Therefore the average length per chip is 3 mm

b)

metal removal rate MR is expressed as;

MR = fvc

v is work speed, c is cross feed and f is infeed

so we substitute

MR = 0.06 × 300 × 5

MR = 90 mm³/sec

Therefore the metal removal rate MR is 90 mm³/sec

c)

number of chips formed per unit time is expressed as

No = Vw × c × G

Vw is wheel speed and G is active grits per area

so we substitute

No = 1600000 × 5 × 50/10²

= 4,000,000 chips/min

Therefore number of chips formed per unit time for the portion of the operation when the wheel is engaged in the work is 4,000,000 chips/min

4 0
3 years ago
Strong performance in your engineering discipline ordinarily is one necessary condition for becoming a successful engineering ma
zhenek [66]

Answer:

1.  Manpower Management

2. Productive Meetings

3.Establish administrative policies, procedures, and standards.

4. High command over assets management.

5. Specific field related knowledge of procurement.

6. Compliance and EHS  knowledge.

Explanation:

4 0
3 years ago
Why does the dead man switch kill the robots manual action when pressed to hard or released
Arturiano [62]

Answer:Why does the dead man switch kill the robot's manual actions when released or pressed to hard? This is because when something goes wrong, say that the robots hits you upside the head, your reaction is either to let go or grip the switch too tight, thus the reason these actions stop all movements

Explanation:

8 0
3 years ago
The post is made of Douglas fir and has a diameter of 100 mm. if it is subjected to the load of20 kN and the soil provides a fri
Solnce55 [7]

Answer:

Explanation:

Kindly go through the attachment for the step by step approach to the solution of this question.

5 0
3 years ago
Other questions:
  • Water at 20 °C is flowing with velocity of 0.5 m/s between two parallel flat plates placed 1 cm apart. Determine the distances f
    5·1 answer
  • Please what is the name of this tool​
    9·2 answers
  • How do cellphones affect the communication industry?
    15·1 answer
  • A chemistry student accidentally drops a large mercury thermometer and it breaks. The thermometer contained 2 grams of mercury (
    13·1 answer
  • Why is understanding the risks and hazards associated with fires important?
    11·2 answers
  • FOR DARKEND1<br><br>÷<br><br><br>try copy and paste​
    5·2 answers
  • Contrast moral and immoral creativity and innovation<br>​
    12·1 answer
  • How many hours must be traveled by car for each hour of rock climbing to make the
    14·1 answer
  • If a material is found to be in the tertiary phase of creep, the following procedure should be implemented:
    8·1 answer
  • What is the resistance of a resistor if the current flowing through it is 3mA and the voltage across it is 5.3V?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!