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
creativ13 [48]
3 years ago
7

R7.1 Carry out the following tasks with an array:

Computers and Technology
1 answer:
Andru [333]3 years ago
6 0

Answer:

Following are the program in the C++ Programming Language.

//set header file or namespace

#include <iostream>

using namespace std;

//define main function

int main() {

//set integer type array with indexing 10

 int a[10];

//set integer type variable to 1

 int i=1;

//set element in 1st index

 a[0]=17;

//set element in last index

 a[9]=29;

//set while loop for the remaining elements

 while(i<9)

 {

//set -1 in the remaining elements

   a[i]=-1;

   i++;

 }

//set for loop to print array

 for ( int j = 0; j < 10; j++ ) {

   cout << a[j]<<endl;

 }

}

<u>Output:</u>

17

-1

-1

-1

-1

-1

-1

-1

-1

29

Explanation:

In the following program, we define the main function "main()" and inside it.

  • Set an integer type array element "a[]" with index value 10.
  • Set integer data type variable "i" initialize to 1.
  • Set elements in the first and last place in the array.
  • Set the while loop to initialize elements for the remaining place.
  • Set the for loop to print the array elements.
You might be interested in
Which was cited as a reason why Google became so popular?
kupik [55]

Answer:

Google became successful because its founders were well-connected. Google was the world's first and best search engine. Google changed the world by solving an old problem in a new way. Google's other products are now more important to its success than search.

Explanation:

3 0
3 years ago
How do you adjust the shear of a shape?
Aloiza [94]
The answer is D. Appearance panel
7 0
3 years ago
Read 2 more answers
The efficiency and effectiveness of a logistics/supply chain operation are constrained by the location of plants and warehouses
Vika [28.1K]

Answer:

True.

Explanation:

7 0
3 years ago
Meeting code =nve-hmqq-qxr<br>​
valentina_108 [34]
Uhhhh meeting code for what
7 0
3 years ago
Read 2 more answers
When evaluating a website's content, whether or not the information is up to date is considered part of the ________ element.
nirvana33 [79]

The currency element constitutes information whether the information of the website is current or up to date.

<h3>Website</h3>

A website is a term used to describe unique publicly accessible web pages that are identified by a domain name. Information on websites is typically updated by website owners, hence, some websites may not be updated frequently when compared to others. Thus, the currency element is an element users take into consideration when evaluating a website's content, whether or not the information is up to date.

You can learn more about the currency element here https://brainly.in/question/48673521

#SPJ1

3 0
2 years ago
Other questions:
  • John works for Internal Computer Specialists, which focuses on helping small business owners resolve MIS infrastructure issues.
    12·1 answer
  • ___ are controls through which a user can enter input data in a gui application. answer
    10·1 answer
  • What is the fastest way to locate a record for updating?
    6·1 answer
  • Which of the following is not an element of the modified block style?
    7·2 answers
  • Evie clicks through her presentation slides and realizes they all have transition effects coming from the same location, from th
    13·1 answer
  • Give me at least five main characteristic of irrigation equipment​
    8·1 answer
  • 1. What type of malware is triggered by a specific condition, such as a specific date or a particular user account being disable
    6·1 answer
  • How much would it cost to get the screen replaced on a Moto G7?
    10·1 answer
  • What is a benefit of an account with interest?
    5·1 answer
  • Which tool can you use to display hardware utilization statistics that tell you about the operation of your computer?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!