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
A lightweight electric car is powered by ten 12-V batteries. At a speed of 100 km/h, the average frictional force is 1500 N. Wha
Aleksandr [31]

Answer:41.67kW

Explanation: a) power = force * velocity

Convert km/hr to m/s=1000m/(60×60s)

=1000/3600

P=F×vel

Power =1500×100× 1000/3600

=1500×100×5/18

=41,666.67W

=41.67kW

6 0
3 years ago
What are the success factors for mechanical engineering?
Eva8 [605]

Answer:

-effective technical skills.

-the ability to work under pressure.

-problem-solving skills.

-creativity.

-interpersonal skills.

-verbal and written communication skills.

-commercial awareness.

-teamworking skills.

Explanation:

is this what ur looking for? if so there ya go lol

7 0
3 years ago
Read 2 more answers
Viscous effects are negligible outside of the hydrodynamic boundary layer. (3 points) a. True b. False
Valentin [98]

Answer:

I would say false but I am not for sure

8 0
3 years ago
Explain 3 ways that people in sports use engineering to increase their performance?
LenKa [72]
Designing systems for manufacturing, motion analysis or impact testing;
building and testing prototypes;
analyzing the human body to prevent injury;
developing or designing new light weight materials that will be more comfortable and withstand greater impacts or forces;
7 0
3 years ago
Pls hurry
sergey [27]

Answer:The answer is Potassium!

Explanation: This is true because each label should tell you about the available amount of a certain element. The standard order is Nitrogen-Phosphorus-Potassium. They are referred to by their standard abbreviations in the periodic table. One problem with fertilizer labels are that they are only required to disclose the amounts of macronutrients (or Nitrogen-Phosphorus-Potassium.)

5 0
3 years ago
Other questions:
  • La base de los tema relacionados a las ciencia de las ingeniería es?
    7·1 answer
  • 1. The area of the given triangle is 25 square units. What is the value of x?<br> X+2
    8·1 answer
  • The shaft is hollow from A to B and solid from B to C. The shaft has an outer diameter of 79 mm, and the thickness of the wall o
    6·1 answer
  • A circuit contains four 100 ohm resistors connected in series. If you test the circuit with a DMM you should read a total resist
    14·1 answer
  • In order to be a Mechanical Engineer, you need to:
    5·2 answers
  • Technician A says that acid core solder should be used whenever aluminum wires are to be soldered.
    14·1 answer
  • 3. Sitúese en la época de los faraones en Egipto. Usted es el encargado de construir una de esas fabulosas pirámides que fueron
    11·1 answer
  • The following two DC motors are to be compared for certain application:
    13·1 answer
  • Think about a good game story that made you feel a mix of positive and negative emotions. What was the story, what emotions did
    13·1 answer
  • In which of the following states would homes most likely have the deepest foundation?
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!