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
How do u know when a website doesnt like u?
stira [4]
Honest answer a website does not have feelings so therefore there is no way to tell if a website likes you or not!! The reason it may not load is because your IT provider or maybe to firewalls that are set up on your modem. Sometimes its not that and you just need to keep you computer up to date that way it can get on the websites! Hope i helped
3 0
4 years ago
Define the following <br>chatting <br>browsing <br>E-commerce​
vova2212 [387]

Answer:

- <em>chatting</em>: real-time communication via keyboard between two or more users on a local network (LAN) or over the Internet.

- <em>browsing</em>: refers to reading and scanning through data; commonly used to describe when a user reads through pages on the Internet and is also often referred to as surfing.

- <em>e-commerce</em>: commercial transactions conducted electronically on the internet.

5 0
3 years ago
is there reality in your point of view ? if your answer is yes, is there a couse effect relation ship between reality and appera
zheka24 [161]

Answer: Yes but maybe yes

Explanation: reality does exist pinch yourself

8 0
3 years ago
Read 2 more answers
Alan is working on a draft document. He wants the document to have more white space. He can do this by changing the line spacing
Alex

It is a true statement that changing the line spacing will make the document have more white space.

<h3>What is a line spacing in word document?</h3>

This refers to the distance between upper and lower lines of text.

These line spacing are tools that make text much more readable because its places distance between the word lines.

By using a line spacing, there will be more spaces and white spaces on the word document.

Therefore, the statement is a correct statement.

Read more about line spacing

<em>brainly.com/question/25277953</em>

8 0
2 years ago
What are some principles of Programming?​
adelina 88 [10]

Answer:

1: Don't repeat yourself (DRY).

2: Keep it simple (KISS)

3. Minimize Coupling

4. Maximize Cohesion

5. Hide Implementation Details

6. Law of Demeter

7: Open/Closed Principle

Explanation:

1. Avoiding repetition is probably the single most fundamental tenet in programming.

2. Simplicity should always be a key goal. Simple code takes less time to write, has fewer bugs, and is easier to modify.

3. Any section of code (code block, function, class, etc.) should minimize the dependencies on other areas of code. This is achieved by using shared variables as little as possible.

4. Code that has similar functionality should be found within the same component.

5. Hiding implementation details allows change to the implementation of a code component while minimally affecting any other modules that use the component.

6. Code components should only communicate with their direct relations (e.g. classes that they inherit from, objects that they contain, objects passed by argument, etc.)

7. Software entities (classes, modules, functions, etc.) should be open for extension, but closed for modification. In other words, it is not recommended to write classes that people can modify, write classes that people can extend.

I hope this helps and I'm sorry if it doesn't.

Have a great day! :)

8 0
3 years ago
Other questions:
  • A cpu with an external clock speed of 2 ghz and a 64-bit data bus can (theoretically) transfer how much data per second?
    8·1 answer
  • Can somebody help me?
    11·1 answer
  • For security reasons a network administrator needs to ensure that local computers cannot ping each other. which settings can acc
    5·1 answer
  • How globalization is related to communication technology?
    6·1 answer
  • is a shell program in Windows that holds individual utilities called snap-ins, designed for administration and troubleshooting.
    11·1 answer
  • c++ Consider this data sequence: "3 11 5 5 5 2 4 6 6 7 3 -8". Any value that is the same as the immediately preceding value is c
    14·2 answers
  • A common practice is to create a(n) _____ on any field that is used as a search key, in comparison operations in a conditional e
    6·1 answer
  • One shortcoming of rapid application development (RAD) is _____.
    9·1 answer
  • The derivative of <br><img src="https://tex.z-dn.net/?f=ln%20%5C%3A%20%20%7Cx%7C%20" id="TexFormula1" title="ln \: |x| " alt="l
    7·2 answers
  • Resolution of bitmap graphics is typically measured in
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!