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
lara [203]
3 years ago
12

Hi guys

Computers and Technology
1 answer:
Anastaziya [24]3 years ago
6 0
Vectors and arrays are 0-based, so they don't start at 1 but at 0

your sort works by switching positions of 2 elements, which in your case didn't happen for the pair of the first&second element
your outer-loop starts with k=1, which should be k=0 instead
You might be interested in
Medical assistant, Jackie, was downloading some patient information on cerebral palsy from the Internet. While downloading, Jack
lyudmila [28]

The thing that happened is that she has been a victim of system attack and the right thing for Jackie to do is to have an antivirus that can block the malicious  app obstructing her.

<h3>What is a system hack?</h3>

System hacking is known to be when one's computer is said to be compromise in regards to computer systems and software.

Note that The thing that happened is that she has been a victim of system attack and the right thing for Jackie to do is to have an antivirus that can block the malicious  app obstructing her.

Learn more about system hack from

brainly.com/question/13068599

#SPJ1

3 0
2 years ago
I have to make a online presentation, which program is the best
LiRa [457]
If you want an online presentation, I think you mean by a website.
Best thing you can find is Google Slides.
if you want a program,
LibreOffice is your best bet. It is completely free and it is for Linux, Windows and possibly Mac.
4 0
3 years ago
Read 2 more answers
Used prevalently on the web, it allows for secure messages to be sent between parties without having to agree on, or share, a se
Sati [7]

Answer: A- Public Key Encryption

Explanation: The Public key Encryption is used prevalently on the web, it allows for secure messages to be sent between parties without having to agree on, or share, a secret key. It uses an asymmetric encryption scheme in which the encryption key is made public, but the decryption key is kept private.

7 0
4 years ago
Read 2 more answers
Tasked to install additional RAM in a computer. He unplugs the system from the power source and removes the PC cover. What shoul
Galina-37 [17]

Answer:Put on an ESD(Electrostatic discharge) strap.

Explanation: An ESD wrap which is also known as ground wrap is a sort of a wrap that is tied around the wrist to protect the person electronic equipment's static electricity.  This wrap produces anti static energy which help in not producing any static charge while the technician touches the inner parts of the CPU of other internal parts of the system.

4 0
4 years ago
Write a C++ program to find if a given array of integers is sorted in a descending order. The program should print "SORTED" if t
LenKa [72]

Answer:

The cpp program for the given scenario is as follows.

#include <iostream>

#include <iterator>

using namespace std;

int main()

{

   //boolean variable declared and initialized  

   bool sorted=true;

   //integer array declared and initialized

   int arr[] = {1, 2, 3, 4, 5};

   //integer variables declared and initialized to length of the array, arr

   int len = std::end(arr) - std::begin(arr);

       //array tested for being sorted

    for(int idx=0; idx<len-1; idx++)

    {

        if(arr[idx] < arr[idx+1])

           {

               sorted=false;

            break;

           }

    }

    //message displayed  

    if(sorted == false)

     cout<< "UNSORTED" <<endl;

 else

    cout<< "UNSORTED" <<endl;

return 0;

}

OUTPUT

UNSORTED

Explanation:

1. An integer array, arr, is declared and initialized as shown.

int arr[] = {1, 2, 3, 4, 5};

2. An integer variable, len, is declared and initialized to the size of the array created above.

int len = std::end(arr) - std::begin(arr);

3. A Boolean variable, sorted, is declared and initialized to true.

bool sorted=true;  

4. All the variables and array are declared inside main().

5. Inside for loop, the array, arr, is tested for being sorted or unsorted.  The for loop executes over an integer variable, idx, which ranges from 0 till the length of the array, arr.

6. The array is assumed to be sorted if all the elements of the array are in descending order.

7. If the elements of the array are in ascending order, the Boolean variable, sorted, is assigned the value false and for loop is exited using break keyword. The testing is done using if statement.

8. Based on the value of the Boolean variable, sorted, a message is displayed to the user.

9. The program can be tested for any size of the array and for any order of the elements, ascending or descending. The program can also be tested for array of other numeric data type including float and double.

10. All the code is written inside the main().

11. The length of the array is found using begin() and end() methods as shown previously. For this, the iterator header file is included in the program.

4 0
3 years ago
Other questions:
  • When command is transferred, the process should include a(n): A. Detailed Lesson Learned Report B. Intelligence Report C. Award
    11·2 answers
  • NEW
    10·1 answer
  • What is the smallest colorable area on a display device
    10·1 answer
  • Smileys Pizzeria has a special on cheese pizza this month. 6- inch personal pizzas are $5, 10-inch small pizzas are $8, 14-inch
    6·1 answer
  • If a triathlon is a sport combining three events, what do you think would be the word for a sport combining five events?
    7·1 answer
  • Which of the following statements is FALSE?
    10·2 answers
  • A digital presence created online by an individual or organization using a digital device is called a identity.
    7·1 answer
  • A ________ is an input device that responds to finger touch.
    8·2 answers
  • I'll mark you the brainlest please help
    14·2 answers
  • Moses wants to update the interface of a router. He plans on having a check on the current running configuration file and then w
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!