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
makkiz [27]
3 years ago
11

1. Assume that the vector monthSales of integers has already been declared and that its elements contain sales data for the 12 m

onths of the year in order (i.e., January, February, etc.).Write a statement that writes to standard output the element corresponding to October.2.Assume that the vector arr has been declared. In addition, assume that VECTOR_SIZE has been defined to be an integer that equals the number of elements in arr .Write a statement that assigns the next to last element of the vector to the variable x ( x has already been declared).3. Given an vector a , declared to contain 34 elements, write an expression that refers to the last element of the vector. Please do not use member function to solve this problem
Computers and Technology
1 answer:
avanturin [10]3 years ago
5 0

Answer:

1. cout << monthSales[9];

2. arr[VECTOR_SIZE - 2] = x;

3. cout << a[33];

Explanation:

In the given question the programming language is not mentioned to write the statements, so the statements are written in C++ programming language.

1. 

Although months are between 1-12. Therefore, in January we can mark as element 0, February as element 1, and so on. So October, which was initially 10, was numbered 9.

2.

The second to last dimension is the next to the last element. The final element is smaller than the actual vector scale. The next place to the last element would, therefore, be two less than the vector size.

3.

The last element of the vector array is one less than the total vector number since vectors start at 0.

You might be interested in
A company that connects through your communications line to its server, which connects you to the Internet, is a(n)
hammer [34]
Internet server provider
4 0
3 years ago
What is the output of this Python code?
Simora [160]

Answer:

True

Explanation:

in function guess:- a = x; b = y; c = z

so 45 > 31 AND 45 < 38

since both the stements are true

True is printed

8 0
3 years ago
List four kinds of human interest stories.
VMariaS [17]

Answer:

List of kinds of human interest stories is described below in details.

Explanation:

A story that might be a good human interest account would be the vaccines for corona. Everyone these times is waiting despairingly for corona to stop. Speaking about a vaccine might provide them belief, and it would be delightful to understand how the scientist and physicians truly worry for the people. Maybe prompt them to wear the masks until the vaccines come out.

5 0
3 years ago
Write a complete Java program called Rooter that gets a positive integer called "start" from the user at the command line and th
Nataly_w [17]

Answer:

The program in Java is as follows:

import java.util.*;

import java.lang.Math;

public class Rooter{

public static void main(String[] args) {

    Scanner input = new Scanner(System.in);

 int start;

 System.out.print("Start: ");

 start = input.nextInt();

 while(start<=0){

     System.out.print("Number must be positive\nStart: ");

     start = input.nextInt();  }

 while(start>=0){

     System.out.println(Math.sqrt(start));

     start--;  }

}

}

Explanation:

This declares start as integer

 int start;

This prompts the user for input

 System.out.print("Start: ");

This gets input for start

 start = input.nextInt();

The following is repeated until the user input is valid i.e. positive

<em>  while(start<=0){</em>

<em>      System.out.print("Number must be positive\nStart: ");</em>

<em>      start = input.nextInt();  }</em>

The following while loop prints the square root of each number till 0

<em>  while(start>=0){</em>

<em>      System.out.println(Math.sqrt(start));</em>

<em>      start--;  }</em>

4 0
3 years ago
How has the use of computers impacted business
Svetlanka [38]
It has allowed for better organization, faster communication, and more advanced actions that people can't complete
3 0
4 years ago
Read 2 more answers
Other questions:
  • Which of these converts analog audio signals into digital codes in a computer?
    5·2 answers
  • It is safe to interchange oxygen and fuel gas hoses. A. False B. True
    13·2 answers
  • Which of the following occupations is least likely to involve use of a computing device on a day-to-day basis?
    5·1 answer
  • Write a program that sorts an array of 10 integers using bubble sort. In the bubble sort algorithm, smaller values gradually “bu
    7·1 answer
  • What are demographics? (with regards to marketing)
    11·1 answer
  • Raj’s computer just crashed and he lost most of his files. What should he do to avoid this problem in the future?
    10·2 answers
  • PLEASE HURRY!!!!!!!!!! WILL MARK BRAINLIEST!!
    13·1 answer
  • What are the other way of getting website static​
    14·2 answers
  • Sensory cues are used for script writers to be able to get more creative with the story their are scripting for (i.e.
    15·1 answer
  • Which of the following statement is correct ? A . potential difference is measured by ammeter . B . The unit of potential differ
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!