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
Which terms means device that converts one voltage to another ?
Jet001 [13]

Answer:

I believe it is an adapter

Explanation:

An adapter or adaptor is a device that converts attributes of one electrical device or system to those of an otherwise incompatible device or system. Some modify power or signal attributes, while others merely adapt the physical form of one connector to another.

6 0
2 years ago
Leo noticed that attackers have breached his wireless network. They seem to have used a brute-force attack on the WiFi protected
kakasveta [241]

Answer:

It is called a WPS brutal force attack.

Explanation:

Wired and wireless networks are both susceptible to attacks. The wired network, the advantage as a cable connection, is more secure than wireless networks, but wireless network also have security measures like the wifi protected set up (WPS).

WPS is used to connect to a network without passphrase, but with a key combination or a PIN.

Brutal force attacks are used on WPS to forcefully generate the PIN, using a third party software.

3 0
3 years ago
3 uses of a computer ​
GenaCL600 [577]

Answer:

online bills payment

watching movies or shows

home tutoring

3 0
2 years ago
Read 2 more answers
Green Fields Landscaping Company sells evergreen trees which are priced by height. Customers have a choice of purchasing a tree
Tomtit [17]

Answer:

Answered below

Explanation:

//Program is written in Python programming //language.

number_of_trees = int(input ("Enter number of trees purchased: "))

height_of_trees = float(input("Enter height of trees: "))

delivery_status = input("Do you want trees delivered? enter yes or no ")

price_of_two_meters = 20

total_price = number_of_trees * price_of_two_meters

//Invoice

print (number_of_trees)

print(height_of_trees)

print (total_price)

print (delivery_status)

8 0
3 years ago
And art for always texting graphics are pasted is known as
Arte-miy333 [17]
<span>A. Mechanical i think sorry if im wrong</span>
6 0
3 years ago
Read 2 more answers
Other questions:
  • Any parameter that receives a value and also sends a value outside the function must be declared as a reference parameter.
    8·1 answer
  • using C++ to sort user input. for example, user enter 25numbers and sort them from small to big or big to small, cout thesamlles
    6·1 answer
  • To create a pull quote, how should a user format the text?
    6·2 answers
  • Write a Java program that generates a new string by concatenating the reversed substrings of even indexes and odd indexes separa
    5·1 answer
  • Joann wants to insert page numbers at the bottom of the pages of her document using the Field option in Quick
    12·2 answers
  • Explain three specific &amp; major security threats to internet users. In each case, address whether or not the vulnerabilities
    15·1 answer
  • Create a spreadsheet that lists the ten currencies you chose. For each currency, enter an amount and create a
    12·1 answer
  • Que significa el término Informática?
    6·1 answer
  • When would you insert a merge field?
    10·2 answers
  • A keyboard would be considered what 2 things
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!