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
geniusboy [140]
3 years ago
10

In statistics the mode of a set of values is the value that occurs most often. Write a program that determines how many pieces o

f pie most people eat in a year. Set up an integer array that can hold responses from 30 people. For each person, enter the number of pieces they say they eat in a year. Then write a function that finds the mode of these 30 values. This will be the number of pie slices eaten by the most people. The function that finds and returns the mode should accept two arguments, an array of integers, and a value indicating how many elements are in the array.

Computers and Technology
1 answer:
Feliz [49]3 years ago
6 0

Answer:

  see below

Explanation:

The program of interest is the function "findMode[x, n]" in the attached. It is written the Wolfram Language of Mathematica.

The basic idea is that the data in the array is sorted. The sorted array is partitioned into sets of identical elements, and the number in each of those sets is counted. The maximum of those counts is the mode. The location of the maximum count corresponds to the location of the set having that count. We use that location information to pull out the mode value(s).

If there is more than one mode, all are reported.

__

An example data array is provided, along with the program output.

You might be interested in
1. Write a program to input four numbers and store them in variables.
slega [8]
Honestly , brainly may seem like a place to get answers but it’s not , people come here to troll, like me
7 0
3 years ago
Where to set up wireless network xbox one?
svlad2 [7]
Turn on your Xbox One and go to the Settings menu.

Select Network.

Select Set Up wireless network, to connect to a new network.

Xbox One asks Which one is yours? and displays the wireless networks it detects in your area.

Select the network you want to connect to.

4 0
3 years ago
Write a destructor for the CarCounter class that outputs the following. End with newline.
ycow [4]

Answer:

Following are the code to this question:

CarCounter::~CarCounter()//Defining destructor CarCounter

{

cout << "Destroying CarCounter\n";//print message Destroying CarCounter

}

Explanation:

Following are the full program to this question:

#include <iostream>//Defining header file

using namespace std;

class CarCounter //Defining class CarCounter

{

public:

CarCounter();//Defining constructor CarCounter

~CarCounter();//Defining destructor CarCounter

private:

int carCount;//Defining integer variable carCount

};

CarCounter::CarCounter()//declaring constructor  

{

carCount = 0;//assign value in carCount variable

return;//using return keyword

}

CarCounter::~CarCounter()//Defining destructor CarCounter

{

cout << "Destroying CarCounter\n";//print message Destroying CarCounter

}

int main() //Defining main method

{

CarCounter* parkingLot = new CarCounter();//Defining class object parkingLot

delete parkingLot;//

return 0;

}

  • In the given C++ language code, a class "CarCounter" is defined, and inside the class, a "constructor, Destructors, and an integer variable" is defined.  
  • Outside the class, the scope resolution operator is used to define the constructor and assign value "0" in the integer variable.  
  • In the above-given code, the scope resolution operator, to define destructor and inside this cout function is used, which prints a message.  
  • In the main method, the class object is created, which automatically calls its class constructor and destructors.  
7 0
3 years ago
Advancements in nuclear science have led to technological advances which are both harmful and beneficial. Which would be conside
ExtremeBDS [4]
<span>C) magnetic resonance imaging (MRI) 

hope it helped

</span>
5 0
3 years ago
You want some points? whoever answers first gets 48 points. no cap. better be quick.
LekaFEV [45]

Answer:

4

Explanation:

5 0
2 years ago
Read 2 more answers
Other questions:
  • Describe how computer is in the last 35 years
    6·1 answer
  • George and Miguel want to know more about their local and online competitors and about the retail industry. What is the best way
    9·1 answer
  • When is e-mail an appropriate channel for goodwill messages? If you frequently communicate with the receiver by e-mail and are c
    15·1 answer
  • Explain the importance of mobile computing in communication​
    7·2 answers
  • What does ctto mean?
    11·2 answers
  • Which is NOT a benefit of using visual aids?
    9·2 answers
  • Did anyone do 5.7.5 Factorial on Code HS??<br><br><br><br> 20 POINTS
    9·1 answer
  • What is the outcome when a floating-point number is divided by zero?
    12·1 answer
  • 7.2 code practice edhesive. I need help!!
    13·1 answer
  • Can someone help me debug this please
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!