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
expeople1 [14]
3 years ago
8

Write a function that simulates the roll of a six-sided dice. The name of the function is rollDice. The function accepts no para

meters and returns a pseudorandom int: 1, 2, 3, 4, 5, or 6. Write only the function, not the main program. You may assume that srand() was invoked in the main function. There should not be any cin or cout statements in the function.
Computers and Technology
1 answer:
Mumz [18]3 years ago
4 0

Answer:

int rollDice(){

  return 1 + rand() % 6;

}

Explanation:

You might be interested in
PLS HURRY!! This OS introduced a very cool GUI that had animations and transparencies.
Mumz [18]

Answer:

I think Windows 98 or XP it's one of those

Explanation:

6 0
3 years ago
Weak Induction
slega [8]

Answer:

Following are the answer to this question:

Explanation:

In option 1:

The value of n is= 7, which is (base case)

\to 3^7

when n=k for the true condition:

\to 3^k

when n=k+1 it tests the value:

\to 3^{(k+1)}= 3^k,3\\\to < (k!) 3 \ substituting \ equation \\\to

since k>6  hence the value is KH>3 hence proved.

In option 2:

when:

for n=1:(base case)

\log(1!)

0<=0 \\ condition is true

when the above statement holds value n=1

when n=k

\log(k!)

when n=k+1

\log(k+1)!=\log(k!)+\log(k+1)\\

             

\because k \log k      [\therefore KH>K \Rightarrow  \log(KH>\loK)]

In option 3:

when n=1:

A_1 \cup B=A_1 \cup B\\\\

when n=k

\to (A_1\cap A_2 \cap.....A_k) \cup B\\=(A_1\cup B) \cap(A_2\cup B_2)....(A_k \capB).....(a)\\\to n= k+1\\ \to (A_1\cap A_2 \cap.....A_{kH}) \cup B= (A_1\cup B)\\\\\to  [(A_1\cap A_2 \cap.....A_{k}) \cup B]\cap (A_{KH}\cup B)\\\\\to  [(A_1\cup B) \cap (A_2 \cup B) \cap (A_3\cup B).....(A_k\cup B)\cap (A_{k+1} \cup B)\\\\  \ \ \ \ \ \ substituting \ equation \ a \\\\

hence n=k+1 is true.

7 0
3 years ago
Hdhdhrhdh you are not the intended recipient. xmp-qite-xsy.​
Aleks04 [339]

Answer:

ummmm... okay

Explanation:

3 0
3 years ago
Direct messaging is similar to email, except
fredd [130]
No personal web..............
6 0
3 years ago
Read 2 more answers
This is due in like an hour but I'm confused so please do lend assistance
blagie [28]
Yes you do have to program it first.
4 0
3 years ago
Other questions:
  • Plugging in a cable is a good troubleshooting technique. <br> True or false
    5·1 answer
  • Laura is confused with the spelling of the word pronunciation. She types the word pronunciation. Which feature of the auto corre
    8·2 answers
  • what is the total resistance of a series circuit with four resistors in series of 12 16 20 and 24 ohms​
    14·1 answer
  • Select the correct navigational path to mark all teachers who have achieved “excellent” on their evaluations a red background.
    11·2 answers
  • One of the first signals that an organization is making progress in the development of its IR program, specifically in the devel
    6·1 answer
  • A(n) _________ is a computer system which is part of a larger system which performs a dedicated function.
    8·1 answer
  • Write a program named RectangleArea to calculate the area of a rectangle with a length of 15.8 and a width of 7.9. The program s
    10·1 answer
  • Write a method that returns a version of the given array where all the 10's have been removed. The remaining elements should shi
    9·1 answer
  • Question No. 5:
    7·1 answer
  • The main function of a(n) ____________________ is to centralize access control for the network by keeping an eye on both inbound
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!