subject

Which of the following c++ statements displays a random number in the range 1 through 10?

a)
cout < < 1 + rand() % 10;

b)
cout < < 1 + rand() % (10 -1 + 1);

c)
cout < < 1 + rand() % 10 -1 + 1;

d)
first and second answers are correct

e)
all of the above

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 06:00
What machine listens for http requests to come in to a website’s domain? a. a router b. a browser c. a server d. a uniform resource locator
Answers: 1
question
Computers and Technology, 23.06.2019 09:00
Which best describes the role or restriction enzymes in the analysis of edna a. to break dna into fragments that vary in size so they can be sorted and analyzed b. to amplify small amounts of dna and generate large amounts of dna for analysis c. to purify samples of dna obtained from the environment so they can be analyzed d. to sort different sizes of dna fragments into a banding pattern that can be analyzed
Answers: 1
question
Computers and Technology, 23.06.2019 13:30
Anetwork security application that prevents access between a private and trusted network and other untrusted networks
Answers: 1
question
Computers and Technology, 23.06.2019 21:30
Examine the list below. which factors positively affect lifetime income? check all that apply.
Answers: 1
You know the right answer?
Which of the following c++ statements displays a random number in the range 1 through 10?
Questions
question
Mathematics, 22.01.2021 01:00
question
Mathematics, 22.01.2021 01:00
question
Mathematics, 22.01.2021 01:00
question
Mathematics, 22.01.2021 01:00
question
Mathematics, 22.01.2021 01:00
Questions on the website: 13722360