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
What software application can be used to send and receive email messaging and management appointments in calendar's
anyanavicka [17]

Answer:

Outlook

Explanation:

3 0
3 years ago
Why should the ISO be adjusted when taking a picture of a child blowing out candles in a darkened room?
stepan [7]

Answer:

yes

Explanation:

if any extreme light is flashed at the eyes a red eye would really ruin the picture

3 0
3 years ago
How do we call a very small video,that is repeating unlimitedely
labwork [276]
A very small video that is continuous is called a GIF, which stands for Graphics Interchange Format.

 
3 0
3 years ago
Read 2 more answers
1. Bluetooth
Elza [17]

Complete Question:

1. A wireless technology standard for exchanging data over short distances

2. A particular brand of mobile phone/PDA

3. A network that operates over a limited distance, usually for one or a few users

1. Bluetooth

2. PAN

3. Blackberry

Answer:

1. Bluetooth 2. Blackberry . 3. PAN

Explanation:

1. Bluetooth is a wireless technology standard, used in order to exchange data between mobile devices, like smartphones, tablets, headsets, wearables, over short distances in a one-to-one fashion (which means that it is not possible to build a network based in Bluetooth).

2. Blackberry is a brand of mobile phones/PDAs, very popular a decade ago, because it was the first one to allow mobile users to access e-mails and messages from anywhere, at any time.

3. PAN (Personal Area Network) is an ad-hoc network that it is only available for data exchange at a very short distance, within the reach of a person, i.e. a few meters as a maximum.

It is thought to allow someone to interact with his nearest environment (laptop, tablet, PDA) and it can be wireless (like Bluetooth) or wired (via USB cables).

4 0
4 years ago
Whats the keyboard command that will allow you to copy text ?
mamaluj [8]

its ctrl c and to paste is ctrl v

8 0
3 years ago
Read 2 more answers
Other questions:
  • How does a hard drive work
    14·1 answer
  • which of the following information technology career fields generally requires the lowest level of education for an entry level
    9·1 answer
  • _______________ is the term for the convergence of real-time and non-real-time communications services such as telephony, instan
    11·1 answer
  • What are the principal cybersecurity threats, both internal and external, and the principal safeguards that have been developed
    13·1 answer
  • It's safe to download files from the internet if u perform regular Windows security updates, that is all u need to protect your
    10·2 answers
  • The model for Diminishing Marginal Utility is ______ in nature.
    12·1 answer
  • Many electronic devices use a(n) ?, which contains all the circuit parts in a miniature form.
    14·2 answers
  • What is the creative nature of a computer<br> Help
    15·2 answers
  • Why do we use compliment method?
    13·2 answers
  • Write an algorithm to calculate the sum of integer ​
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!