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
suppose you need to verify how to correctly use commas. you pen your English textbook and scan the chapter titles in which one w
Leviafan [203]
D- Proper punctuation
6 0
3 years ago
WILL GIVE BRAINLIEST!!!!!!!
pishuonlain [190]

Answer:

False

Explanation:

Central Louisiana Regional Port is the small river port (not in a top 100 ports), while New Orleans Port is  $100 million a year reveniew huge port, 7th busiest in US.

3 0
2 years ago
A well-diversified portfolio needs about 20-25 stocks from different categories is this True or False?
borishaifa [10]

Usually they hold 15-20 as the minimum of the portfolios

So I would say True

3 0
3 years ago
Read 2 more answers
Which two statements about using leased lines for your wan infrastructure are true? (?
Karo-lina-s [1.5K]
<span>The following statements are true: 1. Leased lines require little installation and maintenance expertise. ( A high service quality is offered by point-to point system) 2. Leased lines provide highly flexible bandwidth scaling. (This Allows a Constant availability)</span>
7 0
2 years ago
Application software developed by the user or at the user’s request is called ____ software.
Zolol [24]
End-User Software. Because it is not professional

4 0
3 years ago
Other questions:
  • How useful is the creation of folders for your computer
    9·1 answer
  • Design and write an object-oriented program for managing inventory bins in a warehouse. To do this you will use two classes: Inv
    5·1 answer
  • [20 pts] Assume that Bob wants to send a secret message to Alice using RSA encryption. (a) [5pts] (Key generation step) Assume A
    8·1 answer
  • The data I collect in Google Forms are all compiled in a spreadsheet for me.<br> False <br> True
    12·2 answers
  • Can someone please help me with this question??
    12·1 answer
  • 3.2 lesson practice edhesive ​
    6·1 answer
  • ARP request is send to
    12·1 answer
  • Pleas help 99 points and get brainliest
    9·2 answers
  • HELP PLZZ WILL MARK BRAINLIEST
    9·1 answer
  • Which website offers guidance on putting together a checklist to provide guidance on configuring and hardening operating systems
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!