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
Hello everyone. New ppl on Ro.blox? I want to play sometime.
alexira [117]

Answer:

Hello :)

Explanation:

Yesh i play Ro.blox, maybe u or me could friend each other

6 0
3 years ago
Read 2 more answers
after landing, you are tying down the aircraft when a person approaches and asks: "faa. are you the pilot of this aircraft?" wha
Elden [556K]
I wouldn’t say anything because no-one is allowed in the pilot room and also i am landing the aircraft down but the I would talk to them after the flight
3 0
3 years ago
We initialize the parameters to all zero values and run the linear perceptron algorithm through these points in a particular ord
Usimov [2.4K]

The main aim of running the parameters in the linear perceptron algorithm is to be able to develop a machine learning algorithm for binary classification tasks.

<h3>What is a linear perceptron algorithm?</h3>

This refers to the linear classification algorithm that is used in machine learning.

This is done in order to learn a decision boundary that divides different classes using a hyperplane.

Hence, we can see that your question is incomplete because the parameters are not included, hence a general overview was given to give you a better understanding of the concept.

Read more about machine learning here:

brainly.com/question/25523571

#SPJ1

7 0
2 years ago
What do you mean by an algorithm?<br>​
Over [174]
A program that can be used in many scenarios
8 0
3 years ago
What is output by the following code?
Naily [24]

Answer:

Sum = 3

Sum = 9

Sum = 18

Sum = 30

Look at the image for more information.

4 0
2 years ago
Other questions:
  • Your browsing the Internet and realize your browser is not responding which of the following will allow you to immediately exit
    14·2 answers
  • To aid Android app developers, who must account for multiple screen sizes and resolutions, Android has introduced the ____, whic
    15·1 answer
  • Anyone wanna play roblox?? My user is Tsvetok_luis
    11·2 answers
  • A _________ is automatically launched by some trigger and appears in front of the active window
    12·1 answer
  • After Lola gave her friend the password to a protected website, her friend was able to remember it only long enough to type it i
    7·1 answer
  • Please help! would appreciate it very much!
    13·1 answer
  • In the event you get pulled over for a traffic stop, describe the situation from the police officer's perspective and list at le
    6·2 answers
  • Which documents might an employer expect to find in a career portfolio?
    15·2 answers
  • Is there any difference beetween the old version of spyro released on the origional and the newer ones??? or is it only change i
    8·1 answer
  • What statement best describes entrepreneurship?
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!