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
miss Akunina [59]
3 years ago
15

Type two statements that use rand() to print 2 random integers between (and including) 100 and 149. End with a newline.

Computers and Technology
1 answer:
blondinia [14]3 years ago
5 0

Answer:

#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.

You might be interested in
Consider the following code segment:
Leni [432]

The code segment is an illustration of loops and arrays

<h3>What is a loop?</h3>

A loop is a program statement used to perform repetitive operations

<h3>What is an array?</h3>

An array is a variable used to hold multiple values

<h3>How to analyze the program?</h3>

The loop of the program adds the index 0 elements of the first and the second row of the 2-dimensional array.

From the program, the numbers to add are 1 and 100

The sum of 1 and 100 is 101

Hence, 101 will be displayed when the code segment is executed

Read more about code segments at:

brainly.com/question/26683418

7 0
2 years ago
What is the overall objective of an IT risk assessment? To assist IT management in establishing a budget for countermeasures To
QveST [7]
The overall objective of an IT risk assessment is to assist an organization in identifying risks and impacts.<span> The process includes discovering, correcting and preventing security problems.</span>
The IT risk assessment document identifies threats, estimates risks and determines how to manage them.
4 0
3 years ago
What is one task of a system optimization tool?
8_murik_8 [283]

Answer: Identifies what apps start on boot

Explanation: sys opt tools find things that are slowing down your device so anything within that lens will work cleaning sys storage could also work as an answer

6 0
4 years ago
Read 2 more answers
Jamie is not sure a new medication will work because it has not had a large test group. Is Jamie being creative?
Mumz [18]
No, they're being skeptical.
4 0
3 years ago
Read 2 more answers
There are three types of operators in BASIC-256 <br>a) True b) False​
Anestetic [448]

Answer:

a)True is the answer......

6 0
3 years ago
Other questions:
  • Write a recursive method called printNumPattern() to output the following number pattern. Given a positive integer as input (Ex:
    5·1 answer
  • _______ are created under ________, similar to how you create individual files within a broader file folder
    9·2 answers
  • Suppose that TCP's current estimated values for the round trip time (estimatedRTT) and deviation in the RTT (DevRTT) are 400 mse
    9·1 answer
  • 16235 to the nearest ten thousand
    13·2 answers
  • Write an application to pre-sell a limited number of theatre tickets. Each buyer can buy as many as 6 tickets. No more than 178
    5·1 answer
  • Self-disclosure is most likely to occur _____________.a.
    7·2 answers
  • The data _____ component of a database management system (DBMS) is used to create and maintain the data dictionary. manipulation
    14·1 answer
  • SOMEONE PLEASE HELP ME WITH THIS !!!!
    6·1 answer
  • 3. Create mode was one of the most innovative and influential features of which of the following games?
    7·1 answer
  • List four safety factors that must be considered when building mine shaft headgear model
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!