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
zvonat [6]
3 years ago
10

Define a function roll() that takes no arguments, and returns a random integer from 1 to 6. Before proceeding further, we recomm

end you write a short main method to test it out and make sure it gives you the right values. Comment this main out after you are satisfied that roll() works.
Computers and Technology
1 answer:
Lostsunrise [7]3 years ago
6 0

Answer:

Follows are the code to this question:

#include <iostream>//defining a header file

using namespace std;

int roll()//defining a method roll

{

return 1+(rand() %5);//use return keyword that uses a rand method

}

int main()//defining main method

{

cout<<roll();//calling roll method that print is value

return 0;

}

Output:

4

Explanation:

In this code,  the "roll" method is defined, that uses the rand method with the return keyword, that returns the value between 1 to 6, and in the next step, the main method is declared, that uses the print method to calls the roll method.

You might be interested in
Describe an application where a parallel circuit might work better than a series circuit
Mama L [17]
An application where you would prefer a parallel circuit over series would be a string of Christmas lights. If the light string is wired in parallel, when one bulb burns out, it would not effect the red of the string.
6 0
3 years ago
Read 2 more answers
6.4 Predicting Prices of Used Cars. The file ToyotaCorolla.csv contains data on used cars (Toyota Corolla) on sale during late s
Brums [2.3K]

Answer:

Compare the predictions in terms of the predictors that were used, the magnitude of the difference between the two predictions, and the advantages and disadvantages of the two methods.

Our predictions for the two models were very simmilar. A difference of $32.78 (less than 1% of the total price of the car) is statistically insignificant in this case. Our binned model returned a whole number while the full model returned a more “accurate” price, but ultimately it is a wash. Both models had comparable accuracy, but the full regression seemed to be better trained. If we wanted to use the binned model I would suggest creating smaller bin ranges to prevent underfitting the model. However, when considering the the overall accuracy range and the car sale market both models would be

Explanation:

8 0
3 years ago
Xml provides a standardized, non-customizable way to describe the content of a document.
Rainbow [258]
XML (eXtensible Markup Language) is a meta-language that defines a language (of your creation, within XML specs). The language that you create has to follow your specifications.
7 0
3 years ago
An excel file called “student_gpa” is opened. What does the funnel next to “GPA” indicate
Ivan

Answer is A. The data has been filtered

The funnel in Excel lets you know that there is a filter in place on the columns. It is a filter icon. By default, any filtered column in Excel gets a little funnel icon on the top row as shown in the image attached. Once this funnel symbols is clicked, it gives you options to filter using several criteria.

6 0
3 years ago
Select the correct answer from each drop-down menu.
lys-0071 [83]

Answer: A and C

Explanation:I did it before

6 0
3 years ago
Other questions:
  • The title of a Web page is the text that appears on the title bar and taskbar of the browser window. *
    13·1 answer
  • How do you ask someone for help?
    6·1 answer
  • 3. What type of error is in the following sentence? "George W. Bush is the President of the United States of
    5·1 answer
  • When a speaker is finished talking, you should allow for _____.
    14·2 answers
  • T F The exit function can only be called from main .
    10·1 answer
  • Write a SELECT statement that returns three columns: EmailAddress, OrderID, and the order total for each customer. To do this, y
    14·1 answer
  • What is the Microsoft excel window where you work on. And it composed of three worksheet?​
    7·1 answer
  • Which of the following class definition defines a legal abstract class Group of answer choices public class Rectangle abstract {
    15·1 answer
  • What are common considerations businesses need to make before purchasing new computers? Check all of the boxes that apply.
    6·1 answer
  • Since the size of cache is always smaller than the size of the main memory, the sum of bits of the offset and index of a cache w
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!