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]
3 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]3 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
Janelle is organizing an outline for an investigative report about the benefits of taking a 30-minute walk each day. which of th
Xelga [282]

Answer:

Err. I'm getting vibes from C.

Explanation:

Janelle is organizing an outline for an investigative report about the benefits of taking a 30-minute walk each day.

Benefits - Good/Helpful

8 0
3 years ago
Read 2 more answers
Create a goal seek analysis to determine what the price should be to generate demand of 2,625,000 tablets given that the supplie
Svetach [21]

Answer:

Explanation:

The following image shows the required entries that are to be filled in the excel sheet:

Goal Seek Parameters and Results

Set Cell                                        C14

To Value By Changing Cell        2625000

By Changing Cell                         C3

Resulting Price?                           $290

Explanation:

The goal seek tool in excel is used to change a value in the calculation to get the desired results.

In the given question, it is required to get the demand of tablets to reach the value of 2,625,000 by changing the price.

The value that is to be inserted in the “Set cell” field is the cell number which shall contain the desired result. This cell must have a formula having the cell which is inserted in the “by changing cell” field.

In the given question, the value of demand is desired.

The cell value which stores the calculated demand is C14 is and hence it is inserted in the field “Set cell”

The “to value” field of the goal seek tool is used to set the desired result.

Here, 2,625,000 is the value that is desired and hence it filled in the “To value” field.

The “By changing cell” field of the goal seek tool, represents the cell whose value is to be changed for getting the desired results.

Here, the value of price is required to be changed to get the required demand, thus the value that should be inserted in the “By changing cell” of the goal seek tool is C3, which represents the price.

The required demand is achieved by changing the price to $290.

8 0
3 years ago
What type of trust model is used as the basis for most digital certificates used on the internet?
vesna_86 [32]

The type of trust model that is used as the basis for most digital certificates used on the internet is known to be option B. distributed trust.

<h3>What is the trust model of the Internet?</h3>

The trust model of the internet is known to be one that is made up of tradeoffs.

Note that Distributed trust is seen as the system that is made up of transactions and it is one that is backed up by an extended community and onw where there is no trusted third parties.

Hence, The type of trust model that is used as the basis for most digital certificates used on the internet is known to be option B. distributed trust.

See full question below

What type of trust model is used as the basis for most digital certificates used on the Internet?

A. third-party trust

B. distributed trust

C. related trust

D. managed trust

Learn more about digital certificates from

brainly.com/question/24931496

#SPJ1

3 0
2 years ago
What shortcut keys do i use to print something on my keyboard ?
romanna [79]
CTRL+P. It's usually pressed when you want to print something.
5 0
3 years ago
Read 2 more answers
Describe accessibility in Windows 7 ​
satela [25.4K]

Answer:

Accessibility is the epitome of usability and was a key tenet throughout the engineering of Windows 7. ... Windows 7 includes accessibility options and programs that make it easier to see, hear, and use your computer including ways to personalize your computers and use keyboard shortcuts.

7 0
3 years ago
Other questions:
  • Common types of possessed objects are smart cards, rfid-encoded badges, magnetic cards, ____, and smartphones that are swiped th
    7·1 answer
  • If the user enters 26 what is output? _____________
    15·1 answer
  • The network architecture component that is a special LAN with a group of servers that enables electronic data exchange of betwee
    11·1 answer
  • The unique constraint differs from the primary key constraint in what way?â
    15·1 answer
  • Whoever answers int the next 15 minutes will get brainliest. To get brainliest, it also has to be the correct answer. 8 points r
    11·2 answers
  • ITS MAKING ME TYPE URL CODES NOW!
    6·1 answer
  • Sadie helman runs a web site for amateur snowboarders. she likes to post videos and music related to snowboarding on her site as
    12·1 answer
  • Outputting all combinations. Output all combinations of character variables a, b, and c using this ordering abc acb bac bca cab
    7·1 answer
  • When the amount of storage data is big, and we need the searching and insertion must be very fast, which kind of data structure
    9·1 answer
  • Quiz Time!
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!