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]
4 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]4 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
Which question is MOST important for an office to consider when upgrading to new software
Marina CMI [18]
Either B or D those are the most reasonable answers if it were up to me to answer i would pick B but that is up to you go ahead and try your best i hope u have a nice day ✨✌️✨
6 0
3 years ago
What's the technique of drawing a 3D object with one vanishing point?​
zepelin [54]
I don’t no it brother n I was searching for this answer can u plz tell me
7 0
3 years ago
Read 2 more answers
Open punctuation means that no punctuation follows the salutation or complimentary close. *
zloy xaker [14]

Answer:

True

Explanation:

When open punctuation is used, we do not expect the use of punctuation after salutation or complimentary close. It is a relatively new concept in business writing and we can rightly use this method in modified block letter style of writing.  

Some companies have developed business letter templates that are arranged in an open style, which permits the use of open punctuation in all aspect of business writings.  

7 0
3 years ago
Fordham3 Hardware is known for its consensus buying center culture. Recognizing this corporate culture, someone attempting to se
balandron [24]

Answer: (c) focus exclusively on the head of the buying center.

Explanation:

As Fordham3 Hardware is known for its consensus buying center culture, so someone attempting to sell to Fordham3 should focus exclusively on the head of the buying center.

8 0
3 years ago
In what way(s) did the password you tried to use not meet the password policy requirements?
Gre4nikov [31]
Depends on the organization. Password policies differ between each organization. Generally on a mainstream point of view. Passwords should generally be complex. If your passcode is too short. This could pose a risk to your account and the companies data could be at risk.

Broad range of possible pass code rules that may be blocked.

7 character limit
Capital letter and/or number figure
No easy consecutive digit or character: e.g abcd1234
8 0
3 years ago
Other questions:
  • In which area of engineering does material selection play a vital role a design optimization b forensic engineering c mechanical
    6·1 answer
  • Jorge needs to print out an essay he wrote but he does not have a printer his neighbor has a printer, but her internet connectio
    12·1 answer
  • An automated search feature used by search engines to find results that match your search terms is called a spider or ?
    5·1 answer
  • The set of folders and subfolders that MATLAB searches through to locate a command or M-file is called the ___________.(fill in
    9·1 answer
  • When proofreading, you should ____.
    10·2 answers
  • Which are reasons to create a study schedule? Check all that apply.
    14·2 answers
  • The Green Revolution innovations in agriculture based on a package of inputs including all of the following except?
    7·1 answer
  • Create an application named TurningDemo that creates instances of four classes: Page, Corner, Pancake, and Leaf. Create an inter
    7·1 answer
  • In a system where Round Robin is used for CPU scheduling, the following is TRUE when a process cannot finish its computation dur
    13·1 answer
  • Jak sie pisze oł na klawiaturze komputerowej
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!