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
Joaquin is considering a career as an animator and wants to know more about the daily work of an average animator. Which strateg
Advocard [28]
Lacking a response to my question, I'll assume there's no "correct' answer here. 

Joaquin could contact the university's graphic arts department, or if he's interested in the programming side of it, the computer science department, and ask if they have any information on the topic. If he's already majoring to become an animator, then he should talk to one of his professors to see if they know someone in the business that would speak with Joaquin. 

The faster and better way would be to go to reddit, or some site at which animators congregate (most probably found through Google), read the forums, and create if he's not finding a suitable answer.
3 0
3 years ago
Which type of connection is needed to synchronize data with a cloud service?
Svetllana [295]

Answer:

Internet

Explanation:

The "Cloud" is an Online service this means it works on the Internet and without the Internet you can't have access to it.

7 0
3 years ago
Identifica una necesidad que implique la reducción de los efectos perjudiciales relacionados al uso de los recursos energéticos.
ELEN [110]

Answer:

Baje las persianas o cierre las cortinas en los días calurosos, para mantener la casa fresca y reducir el uso de ventiladores eléctricos o aire acondicionado. Deje que la ropa se seque naturalmente. Mantenga las tapas en las ollas cuando cocine para ahorrar energía. Use baterias recargables.

5 0
2 years ago
What type of space is often the main focal point of the composition in graphic design
iogann1982 [59]

Answer: what are the choices?

Explanation:

3 0
3 years ago
Write a method max() which take a generic singly linked list as an argument and returns the maximum element reference in the lis
max2010maxim [7]

Answer:

See explaination

Explanation:

java code:

class DONALD

{

static class Node

{

int data;

Node next;

}

static Node head=null;

static int largestElement(Node head)

{

Int max=Integer.MIN_VALUE;

while(head!=null)

{

if(max<head.data)

max=head.data;

head=head.next;

}

return max;

}

static int smallestElement(Node head)

{

int min=Integer.MAX_VALUE;

while(head!=null)

{

if(min>head.data)

min=head.data;

head=head.next;

}

return min;

}

static void push(int data)

{

Node newNode=new Node();

newNode.data= data;

newNode.next=(head);

(head)=newNode;

}

static void printList(Node head)

{

while(head!=null)

{

System.out.println(head.data + " -> ");

head=head.next;

}

System.out.println("NULL");

}

public static void main(String[] args)

push(15);

push(14);

push(13);

push(22);

push(17);

System.out.println("Linked list is : ");

printList(head);

System.out.println("Maximum element in linked list: ");

System.out.println(largestelement(head));

System.out.print("Maximum element in Linked List: " );

System.out.print(smallestElement(head));

}

}

6 0
3 years ago
Other questions:
  • When inside a closed work environment, its okay to openly talk with co-workers about PII
    6·1 answer
  • Narrowband Satellite Communications supports ______________ data rates for both mobile and fixed users by providing access on a
    8·1 answer
  • Which of the following data recording procedures is best used for behaviors that have a clear ending and beginning, do not occur
    12·1 answer
  • Write a SELECT statement that selects all of the columns for the catalog view that returns information about foreign keys. How m
    6·1 answer
  • PLEASE HELP!!! THIS IS WORTH A TEST GRADE!!!
    13·1 answer
  • What Word features allow you to copy multiple paragraph formatting syles
    5·1 answer
  • What does FLUX do when soldering an electrical joint?
    13·2 answers
  • Alexandria works for a non-profit company that asks for donations to help the homeless people in her community. Recently the dat
    12·1 answer
  • What do libraries allow you to do in C++, and how do you incorporate libraries into a C++ program?
    10·1 answer
  • As part of your regular system maintenance, you install the latest operating system updates on your Windows 10 computer. After s
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!