# Answered Essay: ECE 216 Programming Project 2 The Bubble Sort You will create a simple Bubble Sort program to sort a s

I need a program using visual studios to do the bubble sort
Please send me the full code, and take a screenshot of the output
This is suppose to do the swapping operation as well.
The example is there
If possible, send screenshots/instructions so I will know how to do it as well

ECE 216 Programming Project 2 The Bubble Sort You will create a simple Bubble Sort program to sort a string of random integers or text or whatever you can punch in from the keyboard. For the input data, you will input a string of single digit ASCII characters, at least 20 of them, in some sort of random order. You aren’t limited to 20. Put in 100 if you like. For the output data, you will simply print this string after it is sorted. For the process, you will sort the data in either descending order (largest value first smallest value last) or ascending order, but you can allow for both possibilities if you wish In order to sort the data, you will need to develop the algorithm for a bubble sort, then create a flow chart or pseudocode so you will understand the process, and finally code it. The bubble sort is perhaps the easiest of the sorting algorithms to write. The basic principle is to simply compare two adjacent numbers. If they are in order, then leave them alone and move to the next pair. If they are out of order, swap their positions in memory, and then move onto the next pair Here is a simple example using 5 numbers. 18496 Start: 1 pass: compare 1 to 8 out of order, swap them now have: 81496 now have: now have: now have: 2nd pass: compare 1 to 4 84196 compare 1 to 9 84916 compare 1 to 6 84961 out of order, swap them out of order, swap them out of order, swap them compare 8 to 4 compare 4 to 9 in order, no swap out of order, swap them now have: 89461 compare 4 to 6 compare 4 to 1 compare 8 to 9 out of order, swap them in order, no swap out of order, swap them now have: 89641 3rd pass: now have: 98641 compare 8 to 6 compare 6 to 4 compare 4 to1 in order, no swap in order, no swap in order, no swap

Here is the code for you:

#include <iostream>
#define SIZE 20
using namespace std;

//Prints the array to screen.
void printArray(char array[])
{
for(int i = 0; i < SIZE; i++)
{
cout << array[i] << ” “;
if((i+1)%10 == 0)
cout << endl;
}
cout << endl;
}

//Sorts the array using bubble sort.
void bubbleSort(char array[])
{
for(int i = 0; i < SIZE-1; i++)
for(int j = 0; j < SIZE-1; j++)
if(array[j] > array[j+1]) //Just change the > sign to < sign, if you want to sort in descending order.
{
char temp = array[j];
array[j] = array[j+1];
array[j+1] = temp;
}
}

int main()
{
char array[SIZE];
cout << “Enter 20 digits: “;
//Loop to read the input from the user.
for(int i = 0; i < SIZE; i++)
cin >> array[i];
//Prints the unsorted data to screen.
cout << “This is the original data, unsorted:” << endl;
printArray(array);
//Calls the method to sort the array.
bubbleSort(array);
//Prints the sorted data to screen.
cout << “This is the sorted data:” << endl;
printArray(array);
}

And the output screenshot is:

Pages (550 words)
Approximate price: -

Help Me Write My Essay - Reasons:

Best Online Essay Writing Service

We strive to give our customers the best online essay writing experience. We Make sure essays are submitted on time and all the instructions are followed.

Our Writers are Experienced and Professional

Our essay writing service is founded on professional writers who are on stand by to help you any time.

Free Revision Fo all Essays

Sometimes you may require our writers to add on a point to make your essay as customised as possible, we will give you unlimited times to do this. And we will do it for free.

Timely Essay(s)

We understand the frustrations that comes with late essays and our writers are extra careful to not violate this term. Our support team is always engauging our writers to help you have your essay ahead of time.

Customised Essays &100% Confidential

Our Online writing Service has zero torelance for plagiarised papers. We have plagiarism checking tool that generate plagiarism reports just to make sure you are satisfied.

Try it now!

## Calculate the price of your order

Total price:
\$0.00

How it works?

Fill in the order form and provide all details of your assignment.

Proceed with the payment

Choose the payment system that suits you most.

HOW OUR ONLINE ESSAY WRITING SERVICE WORKS

Let us write that nagging essay.

By clicking on the "PLACE ORDER" button, tell us your requires. Be precise for an accurate customised essay. You may also upload any reading materials where applicable.

Pick A & Writer

Our ordering form will provide you with a list of writers and their feedbacks. At step 2, its time select a writer. Our online agents are on stand by to help you just in case.

Editing (OUR PART)

At this stage, our editor will go through your essay and make sure your writer did meet all the instructions.