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
zlopas [31]
2 years ago
12

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)
1 #include
2 #include //
3 Enables use of rand ()
4 int main(void) ( int seedval;
6.
7. scanf ("%d", &seedval);
8.
9.
10 srand(int seedval);
11 printf("%d\n", srand());
12 printf("%d\n", srand());
13
14 return e;
15 }
Computers and Technology
1 answer:
Alik [6]2 years ago
8 0

Answer:

#include<stdio.h>

#include<stdlib.h>

int main(void){

int seedval;

scanf ("%d", &seedval);

srand(seedval);

printf("%d\n", rand()%10);

printf("%d\n", rand()%10);

 return 0;

}

Explanation:

The given code is poorly formatted. So, I picked what is usable from the code to write the following lines of code:

#include<stdio.h>

#include<stdlib.h>

int main(void){

This line declares seedval as integer

int seedval;

This line gets user input for seedval

scanf ("%d", &seedval);

This line calls the srand function to generate random numbers

srand(seedval);

This prints a random number between 0 and 9

printf("%d\n", rand()%10);

This also prints a random number between 0 and 9

printf("%d\n", rand()%10);

 return 0;

}

You might be interested in
You have a Bluetooth headset that integrates with your computer so that you can talk to partners through Microsoft Lync. This is
otez555 [7]
I believe this is an example of a Wireless Personal Area Network (WPAN). This type of network provides a low range wireless network that can interconnect devices near each other. So, Bluetooth devices such as a Bluetooth headset would be an example of WPAN.
5 0
3 years ago
Read 2 more answers
In what decade was photography invented? the 1800s the 1820s the 1840s the 1860s
frutty [35]

Answer:

In the year 1820's

It is B

4 0
2 years ago
A company organizes all of its client database in order of the amount of money that the account is worth. When a new account is
svet-max [94.6K]

Answer:

The addition and count algorithm

Explanation:

3 0
2 years ago
Namecoin is an alternative blockchain technology that is used to implement decentralized version of Routing Banking System.A. Tr
vova2212 [387]

Answer:

False

Explanation:

Namecoin is a type of crypto currency which was originally pronged from Bitcoin software. It is coded in the fashion of Bitcoin with the same algorithm as well. Hence it is not a blockchain technology that is used to implement decentralized version of Routing Banking System. Namecoin can store data within its own blockchain transaction database.

4 0
3 years ago
Worksheet ranges can be turned For easy analysis
Firdavs [7]

Answer:

Worksheet ranges is a group of cells, and a value range like 25 to 340. It is used for data modeling. Like you can use it in the vlookup, Hlookup and Xlookup for looking up a column cell value in the mentioned worksheet range. Different worksheet's ranges of cells can also be used, and in any number from throughout the workbook, and that makes the analysis quite easy. Through work sheet ranges we get the control over all the cells as well as cells group. Whatever analysis we do, we do on the list of cells. And through the worksheet ranges we get the control over the cells. And thus, this is extremely useful definitely.

Explanation:

Like one worksheet range can be from top left corner to the bottom right corner. And this assigns whole worksheet as the worksheet range.

Its used in almost all the Excel formulas, and you must know it.

An example is:

Worksheets("Sheet2").Range(Cells(2, "B"), Cells(35, "B")).select

This selects the Range B2:B35 from Sheet 2.  

6 0
3 years ago
Other questions:
  • A _________ is the broadcast of various types of media over the web.
    10·2 answers
  • Your network administrator finds a virus in the network software. Fortunately,
    13·1 answer
  • When performing a basic search with Bing, you first type in your search expression and then click a button to begin the search;
    13·1 answer
  • Given the following sets, for each set operation provide the elements of the resulting set in set notation or using a well-known
    5·1 answer
  • What is one major difference between the roles of film directors and theater directors? A. A theater director is involved in sel
    14·1 answer
  • The sameNumber method checks to see if the number of words in the phrase, numwords, is the same number of words contained in the
    5·1 answer
  • PLEASE HELP ASAP!! Timed test!!
    12·1 answer
  • Is y0utube an example of unsupervised learning or supervised learning?
    13·1 answer
  • Firewalls are available as a special hardware device or as software. A firewall will block packets of information that are from
    7·1 answer
  • Technology __________ guides how frequently technical systems are updated, and how technical updates are approved and funded.
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!