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
List the types of infrared we have
Vlad [161]

Answer: infared types like the sun, sun light, heat lamps, and radiators

6 0
3 years ago
Which of the following is considered a modern method of communication?
Vika [28.1K]
The answer is C. Tablet, because that is the quickest, easiest, and most recent way of communication.
4 0
3 years ago
Read 2 more answers
Policies and procedures set by companies are established to :
frozen [14]

Answer:

The answer is below.

Explanations:

maintain the affairs or rules of conduct of the company, including both the employer and the employees.

The Policies and procedures set by companies will clearly state the responsibilities and duties of both employer and employees, which eventually serve as a means of protecting the interest of all the parties involved in a company.

4 0
3 years ago
A user’s laptop hard drive contains sensitive information. The user often plugs the laptop into the corporate network. A sensiti
jekas [21]

Answer:

the user should disable file and print sharing on the laptop

Explanation:

According to my research on information technology and cyber security, I can say that based on the information provided within the question in order to prevent this the user should disable file and print sharing on the laptop. This is because this file and printer sharing allows users to see your files that you have available as shared and copy or print those files. Which if they are sensitive data you should just disable this option so that people on the same network cannot see or access these files.

I hope this answered your question. If you have any more questions feel free to ask away at Brainly.

6 0
3 years ago
How does human error relate to security risks
oksian1 [2.3K]

Answer:

The error could let people through who really shouldn't be through

8 0
3 years ago
Other questions:
  • Type the correct answer in the box. Spell the word correctly. What aspect should you consider before adding pictures to a docume
    7·2 answers
  • The _____ contains a series of sections designed to prepare students for the ACT
    14·2 answers
  • What is the protocol in the web search at the bottom?
    13·1 answer
  • In this question, you must create a function in C++ using an external editor. When satisfied with your work, you shall attach it
    10·1 answer
  • Which of the following commands would you use to start the program Main with four strings? a. java Main arg0 arg1 arg2 arg3 b. j
    11·1 answer
  • How is the cia triad used to evaluate encryption methods?
    6·1 answer
  • How should tools be stored <br>​
    13·1 answer
  • What happens to a message when it is deleted?
    11·1 answer
  • Which of the following statements about ip addresses is true?
    5·1 answer
  • Computer Graphics:
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!