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
Alex_Xolod [135]
3 years ago
11

write a program that takes 10 numbers as input and displays the mode of the numbers using parallel arrays and a method that take

s an array of numbers as a parameter and returns the value that appears most often in the array
Computers and Technology
1 answer:
irina [24]3 years ago
4 0

Answer:

The Java program is explained below

Explanation:

public class ArrayMode {

  public static int mode(int arr[]) {

      int maxValue = 0, maxCount = 0;

      for (int i = 0; i < arr.length; ++i) {

          int count = 0;

          for (int j = 0; j < arr.length; ++j) {

              if (arr[j] == arr[i])

                  ++count;

          }

          if (count > maxCount) {

              maxCount = count;

              maxValue = arr[i];

          }

      }

      return maxValue;

  }

  public static void main(String args[]) {

      int arr[] = { 9, 5, 3, 8, 5, 12, 19, 5, 11 };

      System.out.println("The set of numbers are: ");

      for (int i = 0; i < arr.length; i++)

          System.out.print(arr[i] + " ");

      System.out.println("\nThe mode of the set is: " + mode(arr));

  }

}

You might be interested in
A picture drawn in 3 d is called?​
Varvara68 [4.7K]

Answer:

autostereogram

Explanation:

that^

6 0
3 years ago
Read 2 more answers
What were the important developments that occurred in photography that facilitated the creation of motion pictures? Two critical
8_murik_8 [283]

Answer:

"A moving picture is an illusion that makes a still photo seem to move. The basic principal behind motion pictures is the fast transition between one picture to the next, almost creating a seamless transition. A flip-book is a good example of this. Another example would be film used for old movies. The film contains negatives of an image which when light is shined through creates a "shadow" of the image. If you quickly transition the film from one image to the next you end up a motion picture."

Explanation:

7 0
2 years ago
How do you view a presentation as your audience would see it?
Nutka1998 [239]
<h3>Answer:</h3>

Option B is the correct answer.

=> By clicking slideshow button.

<h3>Explanation:</h3>

A view in which audience should see the presentation is the SLIDE SHOW VIEW.

Slide show can be started by clicking on the Slide show tab than choose one of the desired option/ways to SET UP SLIDE SHOW.

<h3>I HOPE IT WILL HELP YOU!</h3>
5 0
3 years ago
Read 2 more answers
A device that is connected to the Internet is known as a what?
MrMuchimi
I would say a host or end system
6 0
3 years ago
Read 2 more answers
What should we do to prevent software piracy?
frozen [14]

Answer:

1. Read the End User License Agreement (EULA) for each software product you purchase.

2. Purchase CD software only from reputable resellers.

3. Purchase software downloads directly from the manufacturer's website.

4. Register your software to prevent others from attempting to install your software on their computers.

5. Report piracy if you discover that software you purchased is not authentic or if you suspect that an online reseller or retail establishment is selling counterfeit software.

Link: https://www.techwalla.com/articles/how-to-stop-software-piracy

-Please mark as brainliest!- Thanks!

7 0
3 years ago
Other questions:
  • How to ask for a letter of recommendation via email?
    10·1 answer
  • What type of elements are bridges exposed to yearly
    13·2 answers
  • The Spinning Jenny reduced the number of workers necessary to _______. a.remove cotton seeds from fibers b.pump water from the m
    7·1 answer
  • Help please?
    10·1 answer
  • ​A(n) ____ will hold an online auction buyer’s payment until he or she is satisfied that the item bought matches the seller’s de
    13·1 answer
  • Whitch event describes a festival in rio, brazil that includes a samba parade and eccentric outfits?
    13·1 answer
  • Given two strings s and t of equal length, the Hamming distance between s and t, denoted dH(s,t), is the number of corresponding
    6·1 answer
  • Think back on the Font Tester App. Can you think of an example of another app or feature of an app which would use a loop to con
    14·1 answer
  • In what machines, places and apparatus are dimmers used in? Put at least 5 examples
    9·1 answer
  • Often, a single source does not contain the data needed to draw a conclusion. It may be necessary to combine data from a variety
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!