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
The first step when entering data is _
34kurt

Answer:

click on the cell

Explanation:

This is a little tricky. We need to first think of the column, then of row, and then click on the corresponding cell. And then we either start typing or move our mouse to highlight the cells. Hence, the correct option here is click on the cell.

3 0
3 years ago
What is a distinguishing feature of 5G mmWave
Tatiana [17]

Answer:

Explanation:

mmWave sử dụng phổ vô tuyến tần số cao (từ 24 GHz đến khoảng 39 GHz) để hoạt động, cho phép tăng tốc độ (và thậm chí xa hơn, trong một số trường hợp) 1Gbps. Vấn đề là việc tăng tần số lên càng cao thì khả năng đâm xuyên càng kém đi và khoảng cách truyền ngắn lại, theo Qualcomm thì đôi khi chỉ cần một bàn tay chắn trước điện thoại là đủ để máy khôngBên cạnh đó, mmWave cũng có khả năng làm hao pin thiết bị hơn, ít nhất là ở thời điểm hiện tại. Theo đó, việc tải xuống nhiều dữ liệu hơn có nghĩa là CPU điện thoại của bạn sẽ hoạt động mạnh hơn, nhanh nhất có thể để xử lý tất cả và điều đó sẽ ảnh hưởng đến tuổi thọ pin nhận tín hiệu.

5 0
3 years ago
What OBD-II term applies when all enabling standards for a specific diagnostic trouble code (DTC) are met?
mash [69]

Answer:

Option C i.e., Trip criteria is correct

Explanation:

The concept Trip criteria are described that when the allowing requirements for its diagnostic code are reached.

In other words, Trip seems to be a key-on method where all the allowing requirements for such a specific diagnostic display are fulfilled as well as the diagnostic monitoring is powered. It is finished once the ignition switch becomes switched off.

  • Option A and Option B are not correct because they are the engines that come under the performance ignition system and they are not related to the following scenario.
  • Option D is incorrect because it is the type of data mining that is not related to the scenario.
3 0
4 years ago
Two technicians are discussing lung protection in the shop. Technician A says that respiratory-protection devices can prevent yo
Sveta_85 [38]
The correct answer is Technician A ONLY. I had this on my test, so im sure of my answer!
5 0
4 years ago
Read 2 more answers
What is true about computer files of financial records?
Andrews [41]
Seems like you have forgotten to attach options to choose. But there are some comon statements for such type of tasks and I can recommend you to use this one : finance records should never be kept in computer files. This one is definitely <span> true about computer files of financial records.</span>Next time be more careful.
7 0
3 years ago
Read 2 more answers
Other questions:
  • Automotive engine cylinder heads can be made of what?
    7·1 answer
  • How can a network design project benefit from the principles of itsm? How might itsm impede a network design project?
    11·1 answer
  • If you decide to get married, a trade-off would be that you have to give up being single.
    12·2 answers
  • L00000000000000000000000000000000000000000000000000000000l they b00ty tickled
    6·2 answers
  • Which are benefits of group discussions? Check all that apply. Learning becomes more interesting. Students engage in learning. L
    12·2 answers
  • How do you change the order of the slides in your presentation in the slide pane 
    15·2 answers
  • Consider the method get Hours, which is intended to calculate the number of hours that a vehicle takes to travel between two mil
    6·1 answer
  • Trojans depend on ________ to spread. A rootkits B self-replication C code injection D social engineering
    14·1 answer
  • Finish the format string to get the output shown below.<br> Day<br> &gt;&gt;&gt;{ v8'_format('Day)
    5·1 answer
  • Which scenario is most likely due to an everyday problem rather than a
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!