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
Alchen [17]
3 years ago
6

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 newline. Ex:
5
7
Computers and Technology
1 answer:
jek_recluse [69]3 years ago
5 0

Answer:

The solution code is written in C language.

  1.    srand(seedVal);
  2.    printf(" %d \n", rand() % 9);
  3.    printf(" %d \n", rand() % 9);

Explanation:

srand() is a C library function which seeds the random number generator. The srand() function will take one unsigned integer, <em>seedVal</em>, as input parameter (Line 1).

We can print random integer between (and including) 0 and 9 by calculating the random number modulus by 9 (Line 2-3). This will ensure the final random number will also be between 0 and 9.

You might be interested in
For this exercise, you are going to create a part of an Animal hierarchy. Unlike some of our examples and the previous exercises
kati45 [8]

Answer:

vehicle super class 9.1.4

Explanation:

So you need to create a super class containig all the animals use the class above for referance

5 0
3 years ago
An isotope of an element has:
goldenfox [79]
C: a different atomic mass
3 0
3 years ago
Read 2 more answers
Easy 25 points answer what is it called that you use only 1 and 0 like this 1010010011001100011110001010010101001010101010010101
Arlecino [84]
Binary. Is the correct answe
3 0
3 years ago
What is a lan adapter
ryzh [129]

Answer:

A LAN adapter is an expansion board that is used to connect a computer or computing device to a network. LAN adapter is the most common and generic alternate name for a Network Interface Card (NIC).

4 0
3 years ago
Read 2 more answers
In early Oklahoma, __________ tribes were most nomadic. A. hunting B. farming C. semi-sedentary D. agricultural Please select th
denpristay [2]

Answer:

A

Explanation:

They needed to follow the food/buffalo

5 0
2 years ago
Other questions:
  • Many people object to increased cybersecurity because _____.
    12·2 answers
  • What do the letters of the su command stand for? what can you do with su besides give yourself root privileges? "what can you do
    5·1 answer
  • A database has a built-in capability to create, process and administer itself.
    14·1 answer
  • Which of the following function headings arevalid? If they are invalid, explain why.
    12·1 answer
  • Place the steps in order to link and place text into the document outline, effectively creating a master document.
    8·1 answer
  • Radar devices are used by law enforcement to be sure that individuals are driving safely. They tell the officer how fast the veh
    12·1 answer
  • To all paladins players out there!!!!!
    14·1 answer
  • Please help me on this please i am giving all of my points so please help me
    6·1 answer
  • Calculate the resistance of an unknown resistor in a circuit with 30 volts and 6 amps. The formula is R = V/I.
    6·1 answer
  • Instructions: Write a program that calculates the amount of ingredients needed for various flavors of cheesecake.
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!