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
Convert (65.125)10 to octal.
grigory [225]

Answer:

101.1

Explanation:

Keep in mind that octal has 8 numbers

Step 1: Split your number in 2 parts (integer part and decimal part):

  • integer part 65
  • decimal part 0.125

Step 2: Convert the decimal part. For this step you need to multiply your decimal part and 8 (8 correspond the octal base) and get the integer part until you need it:

      0.125 * 8 =  1

So your decimal part correspond to number 1 in octal = (1)8

Step 3: Convert integer part: for this step you need to divide your integer part by 8 until you can and get the remainder

      65 / 8 = 8 remainder 1

        8 / 8 = 1 remainder 0

         1 / 8 = 0 remainder 1

Step 4: join the remainders from bottom to top and get the integer part

            101

Step 5: join the integer part and the decimal part to get the octal convertion

              101.1

5 0
3 years ago
What should not be compromised when trying to meet standards and deadlines?
n200080 [17]
A i believe is the answer
5 0
3 years ago
What are the odds that you find someone you know in person on here
jenyasd209 [6]

Answer:

0

Explanation:

As far as I know, no one I know, even knows that brainly exists. Those who do  know about it don't use it.

6 0
3 years ago
Discribe two ways you can zoom in and out from an image
krek1111 [17]

Answer:

Select the Zoom tool, and then do any of the following:

<h2>#1. </h2>

Click and hold in the image to zoom in. Press Alt (Windows) or Option (Mac OS) to zoom out.

<h2>#2!</h2>

In the options bar, select Scrubby Zoom. Then drag to the left in the image to zoom out, or to the right to zoom in.

<h2>psst! pls, brailiest!</h2>
3 0
3 years ago
Read 2 more answers
The U.S. is a major player in the global media domain. However, other nations play a role in creating a dominant ideology, as ev
poizon [28]

Answer:

The answer is "Authorization for mobile wiretaps on American citizens."

Explanation:

  • The term media includes advertising, documentaries, painting, and graphic, which allows you to use a blog's domain name, and it can also provide you to create a fake profile.
  • In certain countries, a prevailing philosophy is performed, as demonstrated by the prevalence of telecommunications wiretaps approved in Sweden by US residents.
6 0
3 years ago
Other questions:
  • PLEASE HELP Which of the following is considered a modern method of communication?
    6·2 answers
  • You have connected thirteen pcs and laptops to a wireless network. to make your wlan more secure, what should you do to disallow
    11·1 answer
  • PLEASE HELP
    14·2 answers
  • Using Visio, create a Local Area Network (LAN) consisting of 12 computers, a switch, and three printers. The switch should be in
    11·1 answer
  • What is Java Script?
    13·1 answer
  • What function returns a line and moves the file pointer to the next line?
    9·1 answer
  • Which technology will a business use to figure out who accessed confidential files on a company's computer system
    12·1 answer
  • 1.
    9·1 answer
  • Why is it essential for every person living in the 21st century to have a computer​
    9·1 answer
  • Write an answer in three to five sentences that describes the photo, explains what better lighting would mean for your photograp
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!