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
sweet-ann [11.9K]
3 years ago
11

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

Computers and Technology
1 answer:
bogdanovich [222]3 years ago
8 0

C Code:

#include <stdio.h>      // Enables use of printf

#include <stdlib.h>   // Enables use of rand()

#include <time.h>     // Enables use of time()

int main(void)

{

srand(time(0));  

int random1 = rand()% 50 + 100;

int random2 = rand()% 50 + 100;  

printf("%d\n", random1);

printf("%d\n", random2);

  return 0;

}

Output:

115

141

Explanation:

Each time program executes, srand() function generates new random numbers.

rand()%50 + 100 makes sure that number is 2 digit and within the range of 100 to 150.

Then we print the two random numbers where %d represents that we want to print an integer and \n represents new line  

You might be interested in
If you have a database with birthdates, and you would like to find everyone who was born before June 16, 1967, what would you en
Tcecarenko [31]

Answer:

<June 16,1967

Explanation:

7 0
3 years ago
Read 2 more answers
If they spend all night writing computer programs, Laurence can write 10 programs while Carrie Anne can write 5. If they spend a
kondaur [170]

Answer:

Laurence can write 10 programs while Carrie Anne can write 5.

Laurence can make 6 sunglasses while Carrie Anne can make 4

Explanation:

3 0
3 years ago
I really need help with this question
zhuklara [117]

teleconferencing is like zoom or skype you can be in a call with facetime.

3 0
3 years ago
____ formatting is automatically updated if you change data in the worksheet.
andriy [413]

Answer:

<u>Conditional</u> formatting is automatically updated if you change data in the worksheet.

Explanation:

Conditional formatting can be described as a tool that allows users to format a particular cell or a group of cells. The formatting also changes for any data being changed in the sheet.

A particular cell can have up to three format conditions and these conditions will be applied automatically to any changes entered in the cell. The conditional formatting also has the option to highlight the important cells.

4 0
3 years ago
Advanced Sounds is engaging in a full upgrade of its Windows Server 2003 network to Windows Server 2008. The upgrade includes us
Lynna [10]

Answer:

cs

Explanation:

5 0
3 years ago
Other questions:
  • Problem 1 (Authentication): Consider the following authentication protocol, which uses a classical cryptosystem. Alice generates
    5·1 answer
  • To change the background color of a page, which tab would you use?
    15·2 answers
  • How to do this? ICT Excel there's a screenshot attached
    6·1 answer
  • What is the maximum number of fonts that should be used on a slide?
    13·1 answer
  • Write a program that allows the user to play a guessing game. The game will choose a "secret number", a positive integer less th
    14·1 answer
  • _____ are independent and not associated with the marketing efforts of any particular company or brand.​
    9·1 answer
  • If nobody buys a ticket to a movie, do they still show it?
    5·1 answer
  • Clicking the ____ opens the insert function dialog box.
    13·1 answer
  • The system where the unit of measurement is centimeter
    15·1 answer
  • Text,Audio and graphic is entered into the computer using
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!