Bubble Sort in Batch!

Introduction: Bubble Sort in Batch!

Ever wondered making a simple sorting algorithm in pure batch? Don't worry, it's simple as pie! This also shows the process of it sorting. (Note: I made this in a Windows XP computer so some code may not work. I'm not sure though. Sorry...)

Step 1: Making the Batch File

Copy the code inside the table and paste them in notepad.

@ECHO off

COLOR 0a
TITLE Bubble Sort

Here, you change change the color and title you prefer.

Don't change '@ECHO off' as this prevents cluttering to your program.

Step 2: Making a Random Number Generator

I made a random number generator to prove that this applies to all permutation of numbers!

Download the file and paste them in your current file. (Don't worry, this file is safe.)

Step 3: Sorting Time!

This is where things get sorted. This is the content of your program, and almost the entire of it!

Download the file and paste them in your current file. (Don't worry, this file is safe.)

Step 4: Choice!

Copy the code inside the tables and paste them in notepad.

Basically, if you want to try again or to exit. Anyways, this is the end of the program! Just save as Bubble_Sort.bat and boom! Working bubble sort.

Download the file and paste them in your current file. (Don't worry, this file is safe.)

Be the First to Share

    Recommendations

    • Raspberry Pi Contest

      Raspberry Pi Contest
    • One Board Contest

      One Board Contest
    • Anything Goes Contest 2021

      Anything Goes Contest 2021

    Comments