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
zhannawk [14.2K]
2 years ago
6

Given that the array monthSales of integers has already been declared and that its elements contain sales data for the 12 months

of the year in order (i.e., January, February, etc.), write a statement that writes to standard output the element corresponding to October. Do not write anything else out to standard output.
Computers and Technology
1 answer:
SIZIF [17.4K]2 years ago
5 0

Answer:

       System.out.println("October is the "+monthSales[9]+"th Month of the year");

A complete Java program is given in the explanation section.

Explanation:

public class num4 {

   public static void main(String[] args) {

   int [] monthSales = new int[12];

   int i=0;

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

       monthSales[i] = i+1;

   }

       System.out.println("October is the "+monthSales[9]+"th Month of the year");

   }

}

In the code above, we created an an array of size 12 with this statement

int [] monthSales = new int[12];

using the for loop, the numbers 0-12 are added to the array corresponding to the twelve months in the year

The statement   System.out.println("October is the "+monthSales[9]+"th Month of the year"); outputs the corresponding number to October

You might be interested in
A device that protects electronic equipment from an increase in power, but not a decrease or outage is a ___.
Basile [38]

Answer: A) Battery backup

Explanation:

 A battery backup are used to provide the source of power backup to various hardware components and desktop computers. In many cases, the devices are plugged into UPS ( uninterruptible power supply) for backup power and it is also depend upon the size of the UPS.

All the battery backups are located inside so that is why, the devices are heavy in weight. Usually, the battery backup front required additional button for performing various functions.

And the battery backup devices are manufacture by using the varying degree of backup abilities.

8 0
3 years ago
What kinds of dogs are there
drek231 [11]
There are al types of dogs what specific breed are you looking for

5 0
3 years ago
Read 2 more answers
In ____, data can move in both directions at the same time, such as with a telephone.
gtnhenbr [62]

The answer is d. full-duplex transmission. This communication setup allows for simultaneous transmit and receive for both parties. As signals are able to be transmitted at the same time two way for both parties, for both directions along the same data carrier medium.

4 0
3 years ago
Which HTML tag is formatted correctly?
WITCHER [35]
A: This is a heading
3 0
3 years ago
1.5 Code Practice: Question 1
Jobisdone [24]
What’s the question?
Always remember to add any reasonable information for someone to help or answer!!

Have a good rest of your day.
6 0
2 years ago
Other questions:
  • In this problem we consider sending real-time voice from Host A to Host B over a packet-switched network (VoIP). Host A converts
    12·1 answer
  • Most students overestimate their skill level and abilities to take open book tests.
    11·2 answers
  • All of the following are incentives proprietary schools use to attract a student except
    7·2 answers
  • The Internet of Things (IoT) is a concept with emphasis on machine-to-machine communications to describe a more complex system t
    10·1 answer
  • Meg is in the process of creating a storyboard for her personal website, but she is unable to decide which storyboarding techniq
    10·1 answer
  • ________________are programs that designed to help users to be more productive with their personal tasks
    11·2 answers
  • How can volunteering yo help plan fundraiser for your team or club be a way to develop your strengths?
    13·1 answer
  • In the URL, what is the subdomain and what is the domain name?
    5·1 answer
  • Write out the base sequence that is added directly after the primer. In order for Moodle to correctly grade this question, write
    11·1 answer
  • Explain the consequences of using bits to represent data.
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!