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
goblinko [34]
3 years ago
13

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

s 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:
bonufazy [111]3 years ago
6 0

Answer:

The c++ statement to display the sale corresponding to the month of October is given below.

cout << monthSales[9];

Explanation:

The integer array monthSales contains data for 12 months beginning from January to December, in the order in which the months appear.

January sales is represented by index 0 while December sales is given by index 11.

Hence, the index of the array is one less than the numerical value of the month.

The sales value corresponding to October, the tenth month, is given by index 9, monthSales[9].  

Only the sales for October is displayed as per the question. Nothing else is displayed.

The c++ program to implement the above statement is given below.

#include <iostream>

using namespace std;

int main() {

   // array containing sales data for 12 months

   int monthSales[12];

monthSales[12] = { 1234, 2345, 3456, 4567, 5678, 6789, 7890, 8901, 9012, 1208, 1357, 2470 };

       // only sales data corresponding to month of October is displayed  

   // nothing else is displayed

   cout << monthSales[9];

return 0;    

}

OUTPUT

1208

First, the array is declared.

   int monthSales[12];

The keyword int represents the integer data type of the array.

The number 12 indicates the length of the array. The array will contain 12 values.

The index of the last element will be 12 – 1 = 11.

This is followed by initialization with twelve numerical values.

monthSales[12] = { 1234, 2345, 3456, 4567, 5678, 6789, 7890, 8901, 9012, 1208, 1357, 2470 };

Only the value for October needs to be displayed. This is achieved by the below statement.

   cout << monthSales[9];

The cout keyword is used to display to the standard output.  

No new line character is inserted. No message is displayed.

The sales data can be modified. Only integer values should be taken. Floating or double values will not compile and an error will be displayed.

You might be interested in
Two functions of the UPS​
Angelina_Jolie [31]

Answer:

UPS is abbreviation of Uninterrupted power supply. It is a battery backup devices useful when major supply is interrupted due to any reason.

It performs the following functions:

1. It provides protection from power surges.

2. Smooth out noisy power sources

5 0
3 years ago
Read 2 more answers
4. When inserting clip art into a page of text, which of the following is true? (1 point)
ella [17]
I would vote for D since you can adjust picture positioning and wrapping. A is BS, B and C are not true.
8 0
3 years ago
Read 2 more answers
To remove the field list when working on a report in Design view, tap or click the ____ button on the REPORT DESIGN TOOLS DESIGN
Rudiy27

Answer:

The correct answer to the following question will be "Remove".

Explanation:

A report consists of information taken from tables or queries and information stored in the design of the report such as names, heading, and graphics. Also known as the source of the report are tables or queries that provide the underlying data.

The majority of reporting tools provide only a standard report layout where the report developer may not construct a custom layout with elements positioned in certain areas.

And, If we want to remove any field while working in Design view on a report then we have to click on the remove button for such tasks,

Therefore, the Remove button is the correct answer.

6 0
3 years ago
What does remedial mean
Lesechka [4]
Remedial maintenance (corrective maintenance) Maintenance that is performed after a fault, in hardware or software, has been found, in order to correct that fault.
7 0
3 years ago
Read 2 more answers
The term ____ refers to a wide variety of different database technologies that were developed in order to overcome some of the l
ella [17]
Database management systems are used to store and to access information.
In <span>the Relational Database Management System </span>(RDBMS), all the data is in the form of simple columns and rows in a table. Structured Query Language (SQL) is is the standard query language for RDBMS. Some of the disadvantages of RDBMS are: not enough storage area to handle data such as images, digital and audio/video, do not provide good support for nested structures,not much efficient and effective integrated support.
<span>The term object oriented database management systems (OODBMS)  refers to a wide variety of different database technologies that were developed in order to overcome some of the limitations of relational databases.</span>





5 0
4 years ago
Other questions:
  • What two terms below describe a network device with three ports, two of which send and receive all traffic, and the third port m
    6·1 answer
  • Trish uas bought a new computer, which she plans to start working on aftwr a week. Since Trish has not used computers in the pas
    13·1 answer
  • Which of the following is a Microsoft solution that runs on a Microsoft Terminal Services server but appears, to end users, as i
    10·1 answer
  • Ninety-two percent of the new information was stored on magnetic media, mostly in _____.
    11·1 answer
  • • The length of time between water level measurements/ control adjustments is DT. • If the water level drops to the bottom of th
    13·1 answer
  • Who would use a CLI? (Command Line Interface)
    9·1 answer
  • __________ use a challenge response mechanism in which a server challenges a user with a number, which a user must then enter in
    5·1 answer
  • Which of the following is not a type of bank?
    5·2 answers
  • 100 points, PLEASE HELP...To generate numbers between and including -10 to 10 you would use:
    5·1 answer
  • Please answer this simple (hard) question for me lol
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!