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
zlopas [31]
2 years ago
12

Type a statement using srand() to seed random number generation using variable seedVal. Then type two statements using rand() to

print two random integers between (and including) 0 and 9. End with a newline. Ex:
5.
7.
Note: For this activity, using one statement may yield different output (due to the compiler calling rand() in a different order). Use two statements for this activity. Also, after calling srand() once, do not call srand() again. (Notes)
1 #include
2 #include //
3 Enables use of rand ()
4 int main(void) ( int seedval;
6.
7. scanf ("%d", &seedval);
8.
9.
10 srand(int seedval);
11 printf("%d\n", srand());
12 printf("%d\n", srand());
13
14 return e;
15 }
Computers and Technology
1 answer:
Alik [6]2 years ago
8 0

Answer:

#include<stdio.h>

#include<stdlib.h>

int main(void){

int seedval;

scanf ("%d", &seedval);

srand(seedval);

printf("%d\n", rand()%10);

printf("%d\n", rand()%10);

 return 0;

}

Explanation:

The given code is poorly formatted. So, I picked what is usable from the code to write the following lines of code:

#include<stdio.h>

#include<stdlib.h>

int main(void){

This line declares seedval as integer

int seedval;

This line gets user input for seedval

scanf ("%d", &seedval);

This line calls the srand function to generate random numbers

srand(seedval);

This prints a random number between 0 and 9

printf("%d\n", rand()%10);

This also prints a random number between 0 and 9

printf("%d\n", rand()%10);

 return 0;

}

You might be interested in
What are the advantages of mine shaft gear and the disadvantaged​
romanna [79]

Answer:

One sheave means that you are using a single drum winder. They are the worst! Double drum winders control easier, brake better and are much more efficient. They save time ( two skips or cages) and can be clutched to perform faster shift transport. A single drum is slow, unbalanced and can be a nightmare if it trips out during hoisting. If the brake system is not perfect it can be a real hairy experience. For a runaway single drum, there is no counterbalance effect. It always runs to destruction. With a double drum, the driver still has a chance to control the winder to a certain extent and he has two sets of brakes to rely on. A single sheave could also mean a shaft with a single compartment. No second means of escape unless there are ladders or stairways. Not a very healthy situation.

Those are just a few points. I am sure much more can be said in favor of a double drum winder and two or more sheaves in the headgear. Most of the shafts I have worked at have multiple winders and up to ten compartments. They all have a small single drum service winder for emergencies and moves of personnel during shift times. They are referred to as the Mary - Annes. Apparently, the name originated in the U.K. where an aristocratic mine owner named the first such winder after his mistress.

Explanation:

<em>Hope you got it </em>

<em>If you have any question just ask me</em>

<em>If you think this is the best answer please mark me as BRAINLIEST</em>

5 0
3 years ago
You want to find the distance between two points.
maks197457 [2]

Answer:

For the first picture, choose the second pair, and for the second one, choose the first pair

Explanation:

5 0
3 years ago
In your own words, what does Hypertext Markup Language [HTML] do?
nexus9112 [7]

Answer:

HTML dictates how the browser presents images and text on a webpage.

Explanation:

3 0
3 years ago
Read 2 more answers
PLTW IM Chapter 1.2-1.3 i need this please
Luden [163]

<u>Answer:</u>

<em><u>Biomedical Science</u></em>

<em><u>The application of the principles of the natural sciences, especially biology and physiology to clinical medicine</u></em>

<em><u>Control group</u></em>

<em><u>The group in an experiment where the independent variable being tested is not applied so that it may serve as a standard for comparison against the experimental group where the independent variable is applied.</u></em>

<em><u>Dependent Variable</u></em>

<em><u>The measurable affect, outcome, or response in which the research is interested.</u></em>

<em><u>Experiment</u></em>

<em><u>A research study conducted to determine the effect that one variable has upon another variable</u></em>

<em><u>Forensic Science</u></em>

<em><u>The application of scientific knowledge to questions of civil and criminal law</u></em>

<em><u>Hypothesis</u></em>

<em><u>Clear prediction of anticipated results of an experiment</u></em>

<em><u>Independent Variable</u></em>

<em><u>The variable that is varied or manipulated by the researcher</u></em>

<em><u>Negative control</u></em>

<em><u>Control group where the conditions produce a negative outcome. Negative control groups help identify outside influences which may be present that were not accounted for when the procedure was created</u></em>

<em><u>Personal protective equipment</u></em>

<em><u>Specialized clothing or equipment, worn by an employee for protection against infectious materials.(as defined by OSHA)</u></em>

<em><u>Positive control</u></em>

<em><u>Group expected to have a positive result, allowing the researcher to show that the experiment set up was capable of producing results.</u></em>

<em><u>Adenine</u></em>

<em><u>A component of nucleic acids, energy carrying molecule such as ATP, and certain co enzymes. Chemically it is a purine base.</u></em>

<em><u>Chromosome</u></em>

<em><u>Any of the usually linear bodies in the nucleus that contain genetic material.</u></em>

<em><u>Cytosine</u></em>

<em><u>A component of nucleic acids that carries hereditary information in DNA and RNA in cells . Chemically it is a pyrimidine base.</u></em>

<em><u>Deoroxyribonucleic acid</u></em>

<em><u>A double-stranded helical nucleic acid molecule capable of replicating and determining the inherited structure of a cell proteins</u></em>

<em><u>Gel electrophoresis</u></em>

<em><u>The separation of nucleic acids or proteins, on the basis of their size and electrical charge, by measuring their movement through an electrical field in a gel.</u></em>

<em><u>Gene</u></em>

<em><u>A discrete unit of hereditary information consisting of a specific nucleotide sequence in DNA.( or RNA in some viruses).</u></em>

<em><u>Guanine</u></em>

<em><u>A component of nucleic acids that carries hereditary information in DNA and RNA in cells. Chemically it is a purine base.</u></em>

<em><u>Helix</u></em>

<em><u>Something in spiral form.</u></em>

<em><u>Model</u></em>

<em><u>A simplified version of something complex used, for example, to analyze and solve problems or make predictions.</u></em>

<em><u>Nucleotide</u></em>

<em><u>A building block of DNA, consisting of a 5 carbon sugar convalently bonded to a nitrogenous base and a phosphate group.</u></em>

<em><u>Restriction enzymes</u></em>

<em><u>A degradative enzyme that recognizes specific nucleotide sequences and cuts up DNA</u></em>

<em><u>Restriction fragment length polyphorisms (RFLPs)</u></em>

<em><u>Differences in DNA sequences on homologous chromosomes that can result in different patterns of restriction fragment lengths (DNA segments resulting from treatment with restriction enzymes)</u></em>

<em><u>Thymine</u></em>

<em><u>A component of nucleic acid that carries hereditary information in DNA cells. Chemically, it is a pyrimidine base</u></em>

<em><u>Autopsy</u></em>

<em><u>An examination of the body after death usually with such dissections as will expose the vital organs for determining the cause of death</u></em>

<em><u>Bibliography</u></em>

<em><u>a document showing all the sources used to research information</u></em>

<em><u>Citation</u></em>

<em><u>A written reference to a specific work by a particular author or creator which identifies the document in which the work may be found</u></em>

<em><u>Documentation</u></em>

<em><u>The act of creating citations to identify resources used in writing a work</u></em>

<em><u>Health Insurance Portability and Accountability Act (HIPAA)</u></em>

<em><u>A comprehensive set of standards and practices designed to give patients specific rights regarding their personal health information</u></em>

<em><u>Medical examiner</u></em>

<em><u>A physician who performs an autopsy when death may be accidental or violent. He/she may also serve in some jurisdictions as the coroner.</u></em>

Explanation:

This is what I found when I searched up <u>pltw chapter 1.2-1.3 answers.</u>

I did this because there was not really a question in there.

PS:

I'm sorry if this is too long for you to read.

Give me brainliest, if you want to, that is.

7 0
2 years ago
i need a moderator or someone to answer this :/ why do i keep getting notifications that i have a new chat or a new answer/comme
Lyrx [107]

Answer:

It happens to me as well. Maybe check emails?  It could also be a bug.

Explanation:

4 0
3 years ago
Read 2 more answers
Other questions:
  • Explain why there is an overlap of skills and qualities in design professions​
    14·1 answer
  • The stack pop operation
    10·1 answer
  • FIGURE A-1—Use the information in this chart to answer Question 1.
    6·1 answer
  • Which of the following is an advantage of using
    6·2 answers
  • What are the three main components of a for loop?
    9·1 answer
  • Why media is far from government​
    6·2 answers
  • Your friend decides to create a spreadsheet containing vocabulary terms and their definitions to help prepare for the unit test
    5·1 answer
  • What version of java do i have installed.
    6·1 answer
  • Which statement best describes the computers all around us?
    15·1 answer
  • _________ is the method used by password crackers who work with pre-calculated hashes of all passwords possible within a certain
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!