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
Match these step-by-step directions in the order that you will find them in this course.
7nadin3 [17]

Answer:

1.Go to the View tab and select Watch.

2.Comparison

3.Editing

4.Drawing (I think)

5.Predesigned slides available for creating a new presentation

Explanation:

6 0
3 years ago
To assist a user, a help desk technician is able to take advantage of a Windows proprietary network protocol that allows the tec
puteri [66]

In order to assist an end user, a help desk technician can use the network protocol with a default TCP/IP port number of <u>3389</u>.

<h3>What is the TCP/IP protocol suite?</h3>

The TCP/IP protocol suite is an abbreviation for Transmission Control Protocol and Internet Protocol and it's a standard framework for the transmission (prepare and forward) of information on digital computers over the Internet.

In the Transmission Control Protocol and Internet Protocol (TCP/IP) suite, a help desk technician can use the network protocol with a default TCP/IP port number of <u>3389</u> to assist an end user by opening a graphical user interface to connect with the end user's Windows computer.

Read more on TCP here: brainly.com/question/17387945

#SPJ1

7 0
2 years ago
Write a MARIE program to calculate some basic statistics on a list of positive numbers. The program will ask users to input the
motikmotik

Answer:

a=[23,6,78,36,3,250,127,210,-5]

i = len(a) # calculate length

j = min(a) # calculate minimun

k = sum(a) # calculate sum

l= sum(a)/len(a)  # calculate mean

print(i)

print(j)

print(k)

print(l)

z = 0.0

i=0

x=[23,6,78,36,3,250,127,210,-5]

y = int(l)

while x[i] < y:  

   z= int(x[i]/y)

   print(z)

   x[i] = x[i] - y

   z=z+1

   i=i+1

Explanation:

So above we have calculated Count, minimum, sum and mean/average. Also we did a simple division and printed quotient.

5 0
4 years ago
Kerning is the adjustment of space between ___ characters.
IrinaK [193]
Answer: printed

Explanation: The definition of kerning is; the spacing between letters or characters in a piece of text to be printed.

4 0
4 years ago
​A(n) ________ database makes it possible to store information across millions of machines in hundreds of data centers around th
Kisachek [45]

Answer:

distributed

Explanation:

According to my expertise in information technology, it seems that the type of database being described is a distributed database. Like mentioned in the question this is a database that works by saving information in data centers from various locations and information is processed through multiple database node. This allows information to be more secured, faster, and also acts as a fail-safe in case of any malfunction where data may otherwise be lost.

3 0
3 years ago
Other questions:
  • Write a main method that prompts the user for an integer between 1 &amp; 20 (inclusive). If the user enters an invalid number, p
    8·1 answer
  • This is not homework but how do you fix this I’ve tried everything
    9·1 answer
  • Adam has decided to add a table in a Word doc to organize the information better. Where will he find this option? Insert tab, Il
    6·2 answers
  • Which of the following is the most important system if a company wants to consolidate fan data from multiple sources, i.e., exte
    11·2 answers
  • To delete a row, you must first
    11·1 answer
  • _____ selectors are used to select elements based on elements that are adjacent to them in the document hierarchy.
    9·1 answer
  • What game is the best for racing and modifying cars
    10·1 answer
  • Which tools is used to bundle cables neatly inside and outside of a computer?​
    15·1 answer
  • Sergio needs to tell his team about some negative feedback from a client. The team has been
    14·1 answer
  • Is it possible to see who logged in in youre Microsoft teams account
    11·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!