![liyah7771](/avatars/14577.jpg)
liyah7771
13.07.2020 •
Computers and Technology
Type two statements that use rand() to print 2 random integers between (and including) 100 and 149. End with a newline. Ex: 101 133
Solved
Show answers
More tips
- F Food and Cooking What s the Best Rice for Cooking Plov?...
- F Family and Home How to Remove Fading from Clothes: Tips and Tricks...
- F Food and Cooking How to Make Polendwitsa at Home?...
- F Family and Home Parents or Environment: Who Has the Most Influence on a Child s Upbringing?...
- P Philosophy Unbelievable stories of encounters with otherworldly forces...
- L Leisure and Entertainment How to Choose the Perfect Gift for Men on February 23rd?...
- H Health and Medicine How to Treat Whooping Cough in Children?...
- H Health and Medicine Simple Ways to Lower Cholesterol in the Blood: Tips and Tricks...
- O Other How to Choose the Best Answer to Your Question on The Grand Question ?...
- L Leisure and Entertainment History of International Women s Day: When Did the Celebration of March 8th Begin?...
Answers on questions: Computers and Technology
- C Computers and Technology This is a question for my edge test and i have zero clue how to even start on this can anyone help? The question is below Review the items below to make sure that...
- C Computers and Technology What are some hazards of being an astronomer? ?...
- C Computers and Technology Complete the analogy below. hammer is to nail as screwdriver is to a. wall c. twist b. hit d. screw...
- E English Hii dearsplease don t report this question...
- C Chemistry Create a (simple) hypothesis using if and then word formula....
- P Physics A rocket starts from rest and accelerates to 100 mph in 5 seconds. What is its acceleration?...
- E English Cite / sight meaning ...
- M Mathematics What is speed? the measure of force required to move something a way to describe motion the ability of an object to move the distance an object will move...
- M Mathematics A food and nutrition organization reported that 56 out of every 100 people want to lose weight. If 376 students were surveyed at random in the student union, how...
- H History Why did the writers of the United States Constitution create a federal form of government? To limit the powers of the Senate. To develop a criminal justice system....
Ответ:
#include <iostream>
using namespace std;
int main()
{
cout<< rand() % 50 + 100 <<endl;
cout<<rand() % 50 + 100 <<endl;
return 0;
}
Explanation:
The rand() gives you a random number. If you use rand() % 50, it will give you a random number between 0 and 49. Since we are required to have the numbers between 100 and 149, add 100 to this expression. This way, you will have a random number between 100 and 149. Type this expression two times and use "endl" to end with a new line.
Ответ:
I felt that
Explanation: