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 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 18:00
Freya realizes she does not have enough in her bank account to use the debit card. she decides to use a credit card instead. which questions should freya answer before using a credit card? check all that apply. can i pay at least the minimum payment each month? can i make payments on time and avoid late fees? will i have to take out a loan? how much in finance charges can i afford to pay? should i talk to a consumer credit counseling service?
Answers: 1
question
Computers and Technology, 24.06.2019 11:00
The program below has been generalized to read a user's input value for hourlywage. run the program. notice the user's input value of 10 is used. modify that input value, and run again. generalize the program to get user input values for workhoursperweek and workweeksperyear (change those variables' initializations to 0). run the program. monthsperyear will never change, so define that variable as final. use the standard for naming final variables. ex: final int max_length
Answers: 2
question
Computers and Technology, 24.06.2019 18:30
These factors limit the ability to attach files to e-mail messages. location of sender recipient's ability to open file size of file type of operating system used
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, 21.04.2021 01:00
question
Biology, 21.04.2021 01:00
question
Mathematics, 21.04.2021 01:00
question
Mathematics, 21.04.2021 01:00
question
SAT, 21.04.2021 01:00
Questions on the website: 13722361