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
Sidana [21]
2 years ago
9

Write a function solution that, given an array A consisting of N integers, returns the number of fragements of A whose sum equal

s 0 (that is, pairs (p,q) such that P
Computers and Technology
1 answer:
zubka84 [21]2 years ago
3 0

Answer:

#include <iostream>

using namespace std;

void fragment(int arr[], int n){

   for (int i = 0; i < n; i++){

       for (int x = 0; x < n; x++){

           if (x != i && arr[i] + arr[x] == 0){

               cout<< arr[i] << " , " << arr[x];

           }

       }

   }

}

int main(){

   int n = 7;

   int myArr = {1, 2, -1, -2, 0, 0, 3};

   fragment(myArr, n);

}

Explanation:

The C++ source code defines an array called "myArr" in the main program and its array size n. The void function "fragment" prints out the pairs of the array whose sum equates to zero.

You might be interested in
If you specify a user without specifying a hostname, mysql will
ruslelena [56]
<span>If you specify a user without specifying a hostname, mysql will </span>automatically put a percent sign (%) the host to show that the user can connect from any host.
3 0
3 years ago
What changes could you make so that a message, "User input deemed invalid." during designing a simple calculator program for you
Afina-wow [57]

The most appropriate change in this situation would be to change the message "User input deemed invalid" to "You made a mistake, try again, you can".

<h3>What should we change to improve the children's experience?</h3>

To improve children's experience with this new calculator program, we must adapt all the features of the program for children's users. Therefore, the buttons, the messages and everything related to this program must be suitable for their motor and brain development.

Therefore, it is considered that the message "User input deemed invalid" is not suitable for children because they may not understand this message or misinterpret it and desist from using the new program.

So, the most appropriate message to replace the previous message would be:

  • "You made a mistake, try again, you can"

Because this message is suitable for the friendly language that children use in their daily lives and they would better understand the message without giving up using the new program or the calculator.

Learn more about programs in: brainly.com/question/13264074

#SPJ1

3 0
2 years ago
A mysql prompt has been opened for you. Using the college database, complete the following tasks (use either a single-line or a
Pavlova-9 [17]

Answer:

See Explanation

Explanation:

Given

See attachment 1 for proper table definition

To answer this question, one of the basic sql commands (the "create" command) will be used to create the required table, followed by the fields of the table.

<em>I could not submit my answer directly. So, I added two additional attachments which represent the answer section and the explanation section, respectively.</em>

3 0
3 years ago
Once Google Analytics processes data, it’s stored in a database where it can’t be modified.
Svet_ta [14]

Answer:

The answer to this question is true.

Explanation:

Google Analytics is the method of free tracking device which is offered by Google. Google Analytics shows how User visits website. It helps you exactly see the number of visitors that you store in the database.

It offers information about user behavior that can be critical for your business. The google Analytics refers a reference number which cannot be modified .So the given statement is true.

6 0
3 years ago
How do you measure the capacity of speed and memory of computer system<br>Explain.​
jeka94
Im sorry i just need points
3 0
3 years ago
Other questions:
  • If you are planning to carry a large balance on your credit card, which of the following credit card features should you look fo
    7·2 answers
  • Which type of security personnel may work for government as well as for private security agencies?
    7·2 answers
  • Text, numbers,graphics, sounds entered into a computer's memory during input operations are referred to as
    11·1 answer
  • That is Entrepreneur ? ?<br>​
    8·1 answer
  • Write a program that prints the following text: In C, lowercase letters are significant. main() is where program execution begin
    14·1 answer
  • Write a program that will find the smallest, largest, and average values in a collection of N numbers. Get the value of N before
    13·1 answer
  • How does cryptocurrency exchange software works?
    14·1 answer
  • Which best describes how a supporting database will be structured?
    10·1 answer
  • Explain the term information security?​
    9·1 answer
  • True false.
    10·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!