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
Select the correct answer.
SpyIntel [72]

Answer:

i think real time fluid dynamics

Explanation:

3 0
2 years ago
Due largely to the prevalence of reading them on screens rather than in​ print, the body text of most contemporary documents now
Stella [2.4K]
.The answer is <span>sans serif. </span>Utilize sans serif textual styles in light of the fact that the close uniform width of the strokes keeps the text style intelligible when lessened in determination or diminished in text dimension. Sans serif textual styles are more clear from more distant away, which is the reason they are useful for blurbs and slides, especially the titles and headers.
4 0
3 years ago
Make and run a Python program which:
PSYCHO15rus [73]

Answer:

ok

Explanation:

6 0
2 years ago
When recording data on a multiple-disk storage system, should we fill a complete disk surface before starting on another surface
Cerrena [4.2K]

The user needs to complete the entire disk surface first before starting another surface.

Explanation:

When you are using a multiple disk storage system to write the data the disk automatically writes the disk based on the algorithm for better efficiency and availability of the disk space.

hence when you are recording a data on a multiple disk storage system, it is recommended to fill the complete disk surface initially before you start the another surface to record the data.

4 0
3 years ago
Jamie has to enter the names, grades, and scores of a group of students into a worksheet. Which option will Jamie use to describ
inessss [21]

Answer:

B. Graphs

Explanation:

Graphs are used to put certain things into categories. In this case Jamie has to enter different categories such as names, grades and the scored of the students. C and D don't make sense for this problem since they aren't actually what he is looking for. A is plausible but he needs it into a worksheet and labels aren't worksheets they are just labels. So B would be your answer. Also I took the quiz this is the correct answer.

8 0
3 years ago
Other questions:
  • How can you logout your account and do not want to have this anymore
    12·2 answers
  • Programmers insert documentation called facts into the program code.? <br> a. True <br> b. False
    9·1 answer
  • How many generations of computer languages have there been since the middle of the 20th century?
    10·1 answer
  • Which of the following is NOT a benefit of safety and health programs?
    11·1 answer
  • VEE Physics 2006 E.C
    7·1 answer
  • Why are control components necessary in traditional software and generally not required in object-oriented software?​
    11·1 answer
  • Chantelle wants to change the color scheme for her company's web app, and she needs to get the logos updated. What kind of devel
    8·1 answer
  • Computer simulations were first developed during __________<br> as a part of the _____________
    5·1 answer
  • Please answer fast..​
    15·1 answer
  • The ____ file is typically saved with a prefix of inc_.
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!