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
Describe how electrons move between atoms to create electricity.
pentagon [3]
Applying potential difference to a conductor, by potential force, free electrons gain energy and move from low to high potential. Thus, electrons move from one atom to another.
3 0
3 years ago
Read 2 more answers
Write a program that outputs "Hello World!".
tekilochka [14]
Print(“Hello World!”)

I hope this helps :) I’m sry is this what you wanted or were you looking for something else because I’m willing to help either way.
4 0
2 years ago
What is your understanding about the subject “digital image processing”?
N76 [4]

Answer:

Here's your answer mate.....☺️☺️

Explanation:

In computer science, digital image processing is the use of a digital computer to process digital images through an algorithm. ... It allows a much wider range of algorithms to be applied to the input data and can avoid problems such as the build-up of noise and distortion during processing.

<em><u>Hope it helps </u></em>☺️

5 0
3 years ago
Instant messaging is commonly referred to as
melomori [17]
Chat, IM, in real-time
7 0
3 years ago
when searching for a peer-reviewed journal article, you see the phrase "full text available" in the item record. what does this
Stells [14]

Answer: pay a fee for the whole paper

Explanation:

"Full text available" sometimes alludes to the fact that they have the paper available, but for a price. You must click on this button to view the entire paper instead of just a summary or abstract.

4 0
3 years ago
Other questions:
  • Why would an over the shoulder shot be used
    11·1 answer
  • Within the hardware of the personal computer temporary memory is known as
    10·2 answers
  • What is the main idea of this article? Please someone help me. I will give brainliest answer
    7·1 answer
  • What is binary in computer science ​
    11·1 answer
  • Yesterday you installed a new game on your computer. When you ran the computer, you noticed that the application was running ver
    15·1 answer
  • Can your digital footprint be destroyed or does it remain active on the internet forever
    5·1 answer
  • Pick 2 different operating systems and discuss how they can be used in daily operations.
    5·1 answer
  • Run the browser checker to see that the computer you are using now is set up for WileyPLUS. Which of the following browser funct
    15·1 answer
  • Where is 5G being used and how fast is it?​
    5·2 answers
  • What command in cisco IOS allows the user to see the routing table
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!