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
LiRa [457]
3 years ago
5

Write a program that implement a bubble sort ?

Computers and Technology
1 answer:
Tanzania [10]3 years ago
6 0

Answer:

 A program that implement a bubble sort:

 #include<iostream.h>

 #include<conio.h>

 

int main()

{

int ar[50],no,i,j,temp;

cout<<"Enter array size ";

cin>>no;

cout<<"Enter array elements ";  

 

for(i=0;i<no;++i)

 cin>>ar[i];

 

for(i=1;i<no;++i)

{

 for(j=0;j<(no-i);++j)

  if(ar[j]>ar[j+1])

  {

   temp=ar[j];

   ar[j]=ar[j+1];

   ar[j+1]=temp;

  }

}

 

cout<<"Bubble Sort array";

for(i=0;i<no;++i)

 cout<<" "<<ar[i];

 

return 0;

}

You might be interested in
A ____ is a circuit board that contains most of a server.
8_murik_8 [283]
Motherboard






-------------------------------
6 0
3 years ago
All HTML5 webpages must begin with the HTML element _____.
Paul [167]

Answer:

yes, an HTML webpage must begin with an HTML element

Explanation:

<HTML> <!-- Website Content --> </HTML>

3 0
2 years ago
Within the sites that support disaster recovery, __________ is a separate facility that does not have any computer equipment but
inna [77]

Question:

Within the sites that support disaster recovery, __________ is a separate facility that does not have any computer equipment but is a place where employees can move after a disaster.

A) disaster site

B) hot site

C) warm site

D) cold site

Answer:

The correct answer is answer is D)                  

Explanation:

A cold site is a business location that is utilised as a  backup in the event of a disruptive operational disaster at the normal business site. A cold site is an office, but it does not always have the necessary equipment to resume prompt operations. The business paying for the cold site, provides and installs this equipment.

Cheers!

6 0
3 years ago
If ADD = 81, BAD = 49, and CAD = 64, then what is the value of ACA?
Digiron [165]

Answer:

its 72

Explanation:

i know it because i did it and thats how i know it

6 0
2 years ago
What’s unique about New Cashierless stores?
Anettt [7]
There’s no cashiers, meaning if you need help you got to figure it out alone.
7 0
2 years ago
Other questions:
  • Most languages allow a specialized selection structure called the ____ structure when there are several distinct possible values
    8·1 answer
  • Page No.
    10·1 answer
  • Which one is not an operating system?1.mac 2.Microsoft office3.Iso.3.Android
    11·1 answer
  • If your database is in archivelog mode, how can you force an archive?
    7·1 answer
  • I have lost the watch (that,which) you gave me​
    12·1 answer
  • Because people can easily upload information and share online, they tend to:
    15·1 answer
  • HELP PLZZ WILL MARK BRAINLIEST
    9·1 answer
  • TCP and the User Datagram Protocol (UDP) provide _________ between processes on any two of those hosts. A. address translation B
    6·1 answer
  • Which statement about analog and digital images is true?.
    15·1 answer
  • Draw truth table for the following logic circuit:<br><br> (Please I really need help with this)
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!