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]
3 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]3 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
simpley convert the code below to assembly languageYour proof-of-study task is to hand-compile the code below into an assembly l
sweet-ann [11.9K]
I idk :) ok study is (((47437)
8 0
3 years ago
In an era of widespread cultural change within the United States,
Romashka [77]

In an era of widespread cultural change within the United States, members of the mainstream culture must learn the customs and practices of minority  groups, including new immigrants, and take care to avoid giving offense.  cultural norms of minority groups are so similar to those of the mainstream culture, that  knowing the norms of the majority is sufficient for business success.

Explanation:

  • Acculturation can be defined as the 'process of learning and incorporating the values, beliefs, language, customs and mannerisms of the new country immigrants and their families are living in, including behaviors that affect health such as dietary habits, activity levels and substance use.
  • A cultural misunderstanding occurs when something a word, gesture, object, social context, has different meanings in two cultures.
  • Sometimes the misunderstandings get resolved, sometimes they lead nowhere, and sometimes they can escalate to anything from love to war
  • Ethnic traditions as a sociocultural phenomenon allowing to comprehend the national identity of peoples and universal norms in each culture which make a methodological basis for formation of moral values.
  • But in the 1990s, the term minority usually refers to four major racial and ethnic groups: African Americans, American Indians and Alaska Natives, Asians and Pacific Islanders, and Hispanics.

4 0
4 years ago
Please help it would mean a lot.
Lady_Fox [76]

Answer:

true i think

Explanation:

6 0
3 years ago
Read 2 more answers
The information of an management information system comes from?
Debora [2.8K]

A management information system is a computer system consisting of hardware and software that serves as the backbone of an organization's operations

5 0
2 years ago
Do all careers or professions need computer science? Why or why not?
hjlf

Answer:

Most careers or professions need computer science

Explanation:

As humanity is improving technological wise most jobs will be replaced and other jobs would come into play and in order for individuals to become employed in jobs that will be available in the future to come they will have to have a degree in computer science or know how to operate computers.

8 0
3 years ago
Read 2 more answers
Other questions:
  • What version of android did nexus one run?
    14·1 answer
  • A ____ is used to perform a forward-only (sequential) access of the data in the data source while a ____ is used to populate a d
    11·1 answer
  • What kind of music is liked the most by people
    5·2 answers
  • Which of the following is defined in terms of their activities related to denial-of-service attacks? Cracker Script kiddie White
    6·1 answer
  • Write a program using integers userNum and x as input, and output userNum divided by x three times.
    11·1 answer
  • You are doing a Diffie-Hellman-Merkle key exchange with Danny using generator 2 and prime 29. You pick the secret number 4. What
    14·1 answer
  • What is a graph,a chart then give similarities between graph and chart.​
    6·2 answers
  • CLI is not used friendly ​
    15·1 answer
  • Any computer expert to help me answer this question plz am giving brainliest
    11·1 answer
  • This is the area that displays icons representing open applications.
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!