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]
2 years ago
11

C++

Computers and Technology
1 answer:
Luden [163]2 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
The function keys are labeled from f1 to wat
Fed [463]
If we are talking about a simple North American Keyboard, The answer would be F1 to F12
Hope this Helps!!!
8 0
3 years ago
I'm making a game. I'm trying to make it so that instead of how I currently have it, starting whenever I click the screen, it st
Lera25 [3.4K]
That’s cool I’ll play the game tonight if I can
6 0
2 years ago
When developing an estimate, which of the following items is typically marked up with the highest percentage rate?
dmitriy555 [2]

Answer: D. Labor

Explanation:

8 0
1 year ago
Which function can you perform on a word processor but not on a typewriter?
AnnZ [28]
Deleting a character when you make a mistake and the print it without errors
4 0
3 years ago
Ultimately, there exists a ceiling on efficiency because _______________.
earnstyle [38]
Thank you for posting your question here at brainly. I hope the answer will help you. Feel free to ask more questions.
Among the choices above the answer is C which is <span>of government taxation


To complete the sentece "</span>Ultimately, there exists a ceiling on efficiency because of government taxation
5 0
3 years ago
Other questions:
  • Jameis is researching at his local library when he finds a perfect source to use in his paper. When he goes to check the book ou
    12·2 answers
  • When programming in Scratch, to make our Sprite walk across the background, in which category would we find the programming bloc
    7·1 answer
  • When a rectangular region is defined using an appropriate style, which value matches the specified edge of the clipping region t
    7·1 answer
  • 5. Drawing Conclusions If you were a person in
    10·1 answer
  • What is the term for a Web site that allows users to access and interact with software from any Internet-connected computer or d
    11·1 answer
  • Use the drop-down menus to complete each sentence about the layers of the atmosphere.
    14·2 answers
  • A student opens a recently purchased software package and begins reading the enclosed materials. What information might be inclu
    6·1 answer
  • PLZZZZZZZZZZZZZZZ HELP ME OUT!!!!! I SICK AND TIRED OF PEOPLE SKIPING MYQUESTION WHICH IS DUE TODAY!!!!
    14·1 answer
  • A non-profit organization decides to use an accounting software solution designed for non-profits. The solution is hosted on a c
    11·1 answer
  • A bank wants to reject erroneous account numbers to avoid invalid input. Management of the bank was told that there is a method
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!