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
Which one of the following items would you be most likely to keep in a database? A. Payroll records B. Address book C. Financial
True [87]
The item that you would most likely to keep in a database is a Payroll record. Payroll records are numbers and inputs/outputs of employees of a certain company. Numbers are easier to manipulate and easier to manage than statements, letters and addresses that are basically letters.
3 0
3 years ago
Among object-oriented languages, one feature that varies considerably is whether the language allows multiple inheritance. C++ d
Amiraneli [1.4K]

Multiple inheritance causes Diamond problem which happens when:

Class A is parent of class B and C

Now when class D will be inherited from both Class B and C it will have all the members of class A and B which if same will confuse the compiler to import which one?

C++ solves it by using virtual keyword with them and thus telling the compiler which one to inherit.

Java has introduced the interface concept rather then allowing multiple inheritance.

4 0
3 years ago
What is computer engineering in your own words?
nordsb [41]

Answer: Computer engineering refers to the study that integrates digital engineering with computer sciences to design and develop computer structures and different technological gadgets.

Explanation:

5 0
2 years ago
PERGUNTA 1
Genrish500 [490]

Answer:hola no conozco el toldo, pero necesito puntos cerebrales tan lo siento

Explanation:

8 0
2 years ago
I've been stuck on these two basic javascript assignments for an embarrassingly long time. The teacher refuses to help me and th
user100 [1]

Answer:

it is 29 0ver 30

Explanation:

i took the quiz

5 0
2 years ago
Other questions:
  • Before responding to an e-mail from another student in an online course, a student should
    13·2 answers
  • Graphic designers sometimes must adjust the spacing between letters so that the result looks right to them. This is called
    12·1 answer
  • In this exercise, you are given a phrase and need to return that phrase in all capital letters.
    6·1 answer
  • Write a program whose input is two integers and whose output is the two integers swapped. Ex: If the input is: 3 8 then the outp
    12·1 answer
  • Rewriting notes into complete sentences is unnecessary if you want to include the notes in your study guide. Truth or false?
    15·2 answers
  • You need to design a backup strategy. You need to ensure that all servers are backed up every Friday night and a complete copy o
    6·1 answer
  • Why we call the standard deviation of the sample statistic asstandard error of the statistic?
    14·1 answer
  • Ayúdenme porfa se los agradecería :c
    7·1 answer
  • Now that you have explored several different languages (Python, HTML, CSS, and JavaScript), what can you do to keep straight whi
    7·1 answer
  • Match the TCP/IP Layer to a problem that can happen there.
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!