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
PLEASEEEEEE HELP, ILL DO ANYTHING JUST ANSWER THESE CORRECTLY!!!!!TYSM!!!
REY [17]

10 minutes

Daguerreotype

Connect the cable between them

Shutters

A digital camera

Chemicals

Joseph Niepce

White

Copper

Camera Lenses

False

True

True

True

False

Thank you for taking photography class, I am doing the same class (FLVS SQUAD!!)

3 0
3 years ago
Read 2 more answers
The ____ documents a system at the end of the design phase, identifies any changes since the beginning of the project, and inclu
nekit [7.7K]

Answer:

allocated baseline

Explanation:

The allocated baseline documents a system at the end of the design phase, identifies any changes since the beginning of the project, and includes testing and verification of all system requirements and features.

Hope this helps!

5 0
3 years ago
Read 2 more answers
Complete the following sentence.
pishuonlain [190]

Answer: Career

Explanation: because

7 0
3 years ago
The first real computer was an abacus?
kotegsom [21]
True, false, false. Hope this helps:)
3 0
3 years ago
Brief description email etiquette​
Solnce55 [7]

Answer: See explanation

Explanation:

Email etiquette is defined as the code of conduct which helps to guide the behavior when people send or respond to emails. Some of ail etiquette include:

• Using proper and correct grammar and punctuations.

• Replying quickly too emails.

• Including a clear and direct subject.

• Proofreading of messages.

• Cautious with humour.

• Sending of smaller files and compressing large files.

7 0
3 years ago
Other questions:
  • Consider a load-balancing algorithm that ensures that each queue has approximately the same number of threads, independent of pr
    14·1 answer
  • When using static ip addressing, software automatically configures the network connection on each device.?
    9·1 answer
  • geoffrey is on location for a long shoot. he is worried that the battery power in his camera will not last. which source can he
    5·1 answer
  • Use ___________ positioning to configure the location of an element to remain the same and to not move even when the web page is
    6·2 answers
  • WHAT is the USE OF RIBBON TAB​
    10·1 answer
  • Which describes a design theme in PowerPoint? a set of elements that unify the slides and complement the topic a printed handout
    11·2 answers
  • Draw algorithm and flowchart of multiply A and B​
    10·1 answer
  • Inappropriate use of technology makes it easier for cyber bullies to <br> others.
    13·2 answers
  • DOES ANYONE KNOW COMPUTER SCIENCE?
    8·1 answer
  • 20
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!