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, 22.06.2019 19:00
In he example code, what does the title attribute create? a tool tip an element a source a markup
Answers: 1
question
Computers and Technology, 22.06.2019 21:50
Given int variables k and total that have already been declared, use a while loop to compute the sum of the squares of the first 50 counting numbers, and store this value in total. thus your code should put 11 + 22 + 33 + + 4949 + 50*50 into total. use no variables other than k and total.
Answers: 2
question
Computers and Technology, 23.06.2019 03:00
Your business be in google top rank.more the rank more the business leads.for best seo and digital marketing services be confident to contact you can get best seo solutions by assistance experts provide digital marketing, website development, seo expert services and social media internet seo expert services your branding solutions. seo expert services ,best seo expert services,online seo expert services,
Answers: 3
question
Computers and Technology, 23.06.2019 17:30
What are the most commonly found items in the trash according to the municipal solid waste report?
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, 07.09.2021 17:40
question
Mathematics, 07.09.2021 17:40
question
Spanish, 07.09.2021 17:40
question
Mathematics, 07.09.2021 17:40
question
Mathematics, 07.09.2021 17:40
Questions on the website: 13722363