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
you+increase+the+size+of+a+computer+screen+display+by+20%20%.+then+you+decrease+it+by+20%20%.+what+is+the+size+of+the+computer+s
emmainna [20.7K]

Answer:

The original size??? +20% and then -20% = 0%. If starting at 100% size the screen would be there.

6 0
2 years ago
LeonRoyal15 if anyone plays fortnite
lutik1710 [3]

Answer:

Say less

Explanation:

4 0
4 years ago
Read 2 more answers
Plz hurry it’s timed
sashaice [31]
Micah and adayln hope this helps u
6 0
3 years ago
What kind of job is NOT at greater risk for workplace violence?
natta225 [31]
Well this isnt a computer and technology question ut ill still answer it... youve got being an IT person, Working at build- a-bear, laundry mat, babysitter, there is many different ones
4 0
4 years ago
If you ping a device, you are using the __________ protocol.
geniusboy [140]
Internet Control Messaging Protocol

If you use the -T switch, it'll be TCP
7 0
4 years ago
Read 2 more answers
Other questions:
  • What is the file extension for an impress file??
    10·1 answer
  • There is a concern to be had about the quality of information found on the internet.
    10·2 answers
  • Mobile devices need to work within limited screen space ? true or false
    9·2 answers
  • A large corporation uses:<br>LAN<br>WAN<br>Wireless network<br>Ethernet connection​
    13·2 answers
  • When you ask Siri or Cortana a question, how will you know if the operating system is working?
    14·1 answer
  • A company has recently learned of a person trying to obtain personal information of the employees illegally according to which a
    10·1 answer
  • What is a subjective point of view
    12·2 answers
  • A numeric test score is to be converted to a letter grade of A, B, or C according to the following rules: A score greater than 9
    15·1 answer
  • Mechanisms that can be used to rescue accident victims
    11·1 answer
  • How to transfer bookmarks from one computer to another.
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!