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
Andrej [43]
3 years ago
11

C++

Computers and Technology
1 answer:
Luden [163]3 years ago
7 0

Answer:

The program to this question as follows:

Program:

//header file iostream

#include<iostream> //including file for use basic function

//using name space

using namespace std;

//main method

int main() //defining main method

{

   int a[3][3]; //defining two dimension array

   int x,y,sum=0; //defining variables

   cout<<"Enter array elements: "<<endl; //message

   for(x=0;x<3;x++) // for row

   {

       for(y=0;y<3;y++) //for column

       {

          cin>>a[x][y]; //input values from user.

       }

       

   }

   //loop for calculting sum.

   for(x=0;x<3;x++)

   {

       for(y=0;y<3;y++)

       {

       sum=sum+a[x][y];//add all elements

       }

       

   }

   cout<<"Sum: "<<sum; //print sum.

   return 0;

}

Output:

Enter array elements:  

1

2

3

4

5

6

7

8

9

Sum: 45

Explanation:

In the above C++ programming language code first, a header file is included then the main method is declared, inside a main method 2D array that is "a[][]", and an integer variable is defined that are "i, j, and sum". In the next line for loop is used, this loop is used two times that can be described as follows:

  • The first time it is used for inserting elements from user ends.  
  • The second time, it uses the sum variable to add all array elements. and in the last print function that is "cout" is used for print sum variable value.
You might be interested in
while investigating the settings on your SOHO router, you find two IP address reported on the devices's routing table, which is
DochEvi [55]

Answer:

From the two IP addresses, 192.168.2.1 can be listed as the default gateway in local network devices.

The reason is that we are allocated with the ranges that are reserved for the local networks by RFC 1918.

These ranges are given as follows:

  • For (10/8 prefix)  

                            10.0.0.0 - 10.255.255.255

  • (172.16/12 prefix)

                            172.16.0.0 - 172.31.255.255

  • (192.168/16 prefix)

                            192.168.0.0 - 192.168.255.255

Moreover the default gateway for a device can also be known by the commands ipconfig or  ipconfig/all on the command prompt.

<h3>I hope it will help you!</h3>
7 0
3 years ago
If the ____________ is broken on a laptop, chances are other parts are also broken.
ella [17]
Central processing Unit
8 0
3 years ago
Describe the objectives of e-commerce ?​
AnnZ [28]

Answer: eCommerce is to reach the more and right customers at the right time so that more orders can be placed and in turns, high revenue can be generated.

Explanation:

5 0
3 years ago
Jim has excellent oral and written communication skills. He enjoys public speaking and wants a job in which he will interact wit
fredd [130]
The best job for Jim would be public relations specialist.
7 0
3 years ago
Read 2 more answers
Mobile cameras are now of a higher quality than when they first arrived on the market. Describe the difference in
Anvisha [2.4K]

Answer:

When mobile cameras first arrived on the market, they did not have a high-quality resolution. But after the years, mobile cameras are able to record a significant amount of digital information.

6 0
3 years ago
Other questions:
  • The more resources you have to choose from during an open book test, the better you will do on the test because more
    13·1 answer
  • What is another name for “low-angle lighting”?
    7·1 answer
  • To display the size of your backup file, you can use the Windows program called: Windows Explorer Scan disk Defrag Windows Acces
    8·1 answer
  • What are motion graphics?
    9·1 answer
  • The file type ____ identifies a word 2013 document.
    11·1 answer
  • Antivirus software uses ________ to search for known viruses.
    9·1 answer
  • To communicate with an expansion card, one part of the ____ bus runs between RAM and the processor; the other part runs between
    13·1 answer
  • _____the measuring instrument is not necssery​
    10·1 answer
  • Write a program that repeatedly takes integers from the user as long as he
    7·1 answer
  • Why is it important to identify cables and conductors?​
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!