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]
3 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]3 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
Helen has no experience in security. She would like to earn a certification that demonstrates that she has the basic knowledge n
rewona [7]

Answer:

Option C. Security+ is the correct answer.

Explanation:

8 0
3 years ago
Machine language is the set of binary-coded instructions that are executed directly by a computer. True or false
Sati [7]

Answer:

true

Explanation:

4 0
2 years ago
Windows server 2012 r2 supports two types of folder shares. what are those two types?
larisa [96]
<span>Windows server 2012 r2 supports the following two types of folder shares: </span>Network File System and Server Message Blocks. Correct answer: D
Network File System<span> (</span>NFS) is a distributed file system protocol for <span>storing and updating files on a remote computer. </span>
The Server Message Block<span> (SMB) Protocol is a </span>network file sharing protocol.
7 0
4 years ago
Which statement describes how to insert the IF, COUNTIF, or SUM function into a cell?
Ivan

Answer:

B. Type an = sign in the cell, followed by the name of the function and the relevant arguments.

7 0
3 years ago
Is data science the sexiest job in 21st century according to Harvard business review?
Papessa [141]

Answer:

yuppp

Explanation:

i looked it up lol

3 0
3 years ago
Other questions:
  • Which argument forces a writer to return to and change the input before resolving a “UnicodeError”?
    10·1 answer
  • While ________ is centered on creating procedures, ________ is centered on creating objects. Procedural programming, class progr
    10·1 answer
  • If a simple pipelined processor is super-pipelined by a factor of 3 (the ALU takes 3 cycles instead of one for the smallest oper
    15·1 answer
  • When you set the position property for a block element to absolute, the browser?
    8·1 answer
  • In the case below, the original source material is given along with a sample of student work. Determine the type of plagiarism b
    7·1 answer
  • Type the correct answer in the box. Spell all words correctly.
    15·2 answers
  • Body LanguageWhat are the nonverbal communications mentioned in the video? And how the video explained the meaning of these?
    15·1 answer
  • What is the importance of shape in graphic design?​
    5·2 answers
  • Fort Nite is the best u can’t say it’s not
    13·2 answers
  • Microsoft® Publisher does which of the following?
    9·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!