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
Is a three-prong grounding plug with the third pong broken-off safe to use.
ad-work [718]
What is the answer choices dude
8 0
3 years ago
What is the difference between manual and computer typesetting?
Burka [1]

Answer:

Manual typesetting: The form was placed in a press, inked, and an impression made on paper. During typesetting, individual sorts are picked from a type case with the right hand, and set into a composing stick held in the left hand from left to right, and as viewed by the setter upside down.

Computer typesetting: Computerized typesetting, method of typesetting in which characters are generated by computer and transferred to light-sensitive paper or film by means of either pulses from a laser beam or moving rays of light from a stroboscopic source or a cathode-ray tube (CRT).

6 0
3 years ago
Open IDLE. Create a new script file (File--&gt;New File, Ctrl n on Windows, Cmd n on macOS). On the first line, place your name
Lorico [155]

Answer:

program:

#your name

print("{:10} {:10} {:10}".format("Number","Square","Cube"))

print("{:<10} {:<10} {:<10}".format(0,0,0))

print("{:<10} {:<10} {:<10}".format(1,1,1))

print("{:<10} {:<10} {:<10}".format(2,2**2,2**3))

print("{:<10} {:<10} {:<10}".format(3,3**2,3**3))

print("{:<10} {:<10} {:<10}".format(4,4**2,4**3))

print("{:<10} {:<10} {:<10}".format(5,5**2,5**3))

print("{:<10} {:<10} {:<10}".format(6,6**2,6**3))

print("{:<10} {:<10} {:<10}".format(7,7**2,7**3))

print("{:<10} {:<10} {:<10}".format(8,8**2,8**3))

print("{:<10} {:<10} {:<10}".format(9,9**2,9**3))

print("{:<10} {:<10} {:<10}".format(10,10**2,10**3))

output:

Number Square Cube

0 0 0

1 1 1

2 4 8

3 9 27

4 16 64

5 25 125

6 36 216

7 49 343

8 64 512

9 81 729

10 100 1000

6 0
2 years ago
Computer viruses often spread by means of what?
just olya [345]
Emails, pop-ups and advertisements usually spread computer viruses.
3 0
3 years ago
Which of the strategies below are likely to increase audience attention?
lbvjy [14]

Answer:

Vary the use of transitions for each slide

Explanation:

6 0
3 years ago
Other questions:
  • A brick weighs 26 N. Measured underwater, it weighs 11 N.
    10·1 answer
  • Which function can you use to abbreviate the lengthy expression, A1+A2+A3+A3...+A19+A20?  MAX COUNT SUM ROUND
    10·2 answers
  • You've been asked to find the largest number in a range of numbers. Which of the following could you use to find the largest num
    8·1 answer
  • And what way do you mixed and market economy support the ideals of democracy​
    12·1 answer
  • Which of the following reflects Moore's law? Multiple Choice The doubling of computer chip performance per dollar every two year
    11·1 answer
  • A tablet computer transmits a file over a wi-fi link to an access point.
    13·1 answer
  • Which of the following statements is false? Question 4 options: By convention class names begin with an uppercase letter, and me
    8·2 answers
  • Yuygiihjiujjhuuuuykjyt​
    13·1 answer
  • PACIFIC NORTHWEST
    10·1 answer
  • In Tynker, it is not possible to create a/an __________.
    6·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!