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
Question 3 of 10
kvv77 [185]

Answer:

B. Sometimes, seeing a picture of the process is more helpful than  reading about it.

Explanation:

Video tutorials are a form of communication in which the instructions are given through video instructions. The users drive more information from video tutorials than written or audio. The visual and the auditory aids together helps in creating a better impact on the users. The video tutorial is more user friendly and can easily be controlled by the user. This helps in better understanding and analyzing the information.

8 0
3 years ago
Why header files are needed in every c program ?expalin​
bonufazy [111]

Answer:

Header files serve two purposes. System header files declare the interfaces to parts of the operating system. You include them in your program to supply the definitions and declarations you need to invoke system calls and libraries.

6 0
2 years ago
Which delivery model is an example of a cloud computing environment that provides users with a web based email service ?
Evgen [1.6K]

Cloud computing, also known as cloud services, cloud concepts or simply the cloud, is a paradigm that allows to offer computer services. through a network, which is usually the Internet.

(data persistence, authentication, messaging, etc.). for example, a Linux system, a web server, and a programming environment such as Perl or Ruby).

Commercial examples are Google App ,Microsoft Azure,

3 0
3 years ago
Read 2 more answers
What is the difference between second generation and third generation of computer​
Alexeev081 [22]

Answer:

The main difference between second generation (2G) and third generation (3G) technology is data. 2G services were developed with mostly voice services in mind, but are capable of providing relatively slow (14.4kbps) speed data services.

8 0
2 years ago
What are these receivers called?
AlexFokin [52]

Answer: Cell site / Base station

Explanation:

A mobile network also referred to as the cellular network is refered to as the radio network which is distributed over the land areas which are refered to as the cells.

We should note that each is served by at least one fixed-location transceiver, which is called the cell site or the base station.

4 0
2 years ago
Other questions:
  • If Number = 7, what will be displayed after code corresponding to the following pseudocode is run? (In the answer options, new l
    5·1 answer
  • An ethernet switch has a ____ table which is updated by ______.
    14·1 answer
  • why does it not let me create a new account when i log out of this one and go to join now after i fill everything out it wont le
    11·1 answer
  • It is possible to limit the search results to a range of publication dates.
    13·1 answer
  • Which iteration must have an expression that has a true or false value?
    11·2 answers
  • 1. What are you going to do if someone ask for your personal information online?​
    12·2 answers
  • What will be the value of x after the following loop terminates?
    13·1 answer
  • You can't cite Wikipedia, what are three ways that you can use it for your research?
    5·1 answer
  • Who has played pokemon red, blue, or yellow on the gameboy
    9·2 answers
  • Write an alogorithm and draw the Flow Chart to
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!