User Posts: royal52
0
General Science Knowledge Test
1

  If you think you have too much General Science knowledge then think again, this quiz is developed for the sole purpose of measuring your General ...

0
Binary Tree example code C++
-1

Just create a file Binary.txt in "D drive", then compile and execute the following code. #include<iostream> #include<fstream> ...

0
Read and Write File in C++ example Program
3

You have to create two files named students_file.txt and file.html. Below is the program code:- #include <iostream> #include <fstream> ...

0
Is there a Difference Between JDK And JRE
0

If you are new to Java, you must be asking yourself a lot of questions as you continue to see many different terms starting with the letter “J”. Of course, ...

0
Choose Website Design Services for the Best Mobile Sites
0

You've probably gathered by now that your website needs to be all about your mobile audience these days. In fact, not having a mobile friendly website could be ...

0
The Technology behind Self Storage
0

Most people use self-storages to get rid of items they don’t necessarily need, but are too financially or emotionally valuable to be thrown in the trash. We ...

0
Strategy Pattern in Java
0

Java code development should be done efficiently and java development India experts do it by applying design methodologies into applications. In this article, ...

0
How to use Amazon DynamoDB for Java Enterprise Development
0

You will learn basics of Amazon DynamoDB used by java enterprise development experts for projects. In this post, you will learn about the key areas of this DB ...

0
USES OF CLOUD COMPUTING
0

In few years, cloud computing has revolutionized into the future of the internet. Rackspace however, is on the top in revolutionizing the noted edge of the ...

0
TOP 5 WEB HOSTING COMPANIES IN UK
0

In this article, we have listed the top 5 web hosting companies you may find in the UK, who in our 14 years of experience given top quality with affordable ...

0
Native Advertisement: The Future of Digital Marketing
0

When we talk about the native advertisement, we are talking about advertising in the new media. Native ads are paid content which is created by advertisers, ...

0
Merge Sort in Java with examples
0

Merge Sort is based on a divide and conquer algorithm. It is very easy to implement, and very fast sorting technique. The efficiency/performance is ...

Browsing All Comments By: royal52
  1. just write if(array[j] lesser then array[j+1]) instead of if(array[j] greater then array[j+1]) and it will sort the array in descending order.

  2. I have updated my comment with a code block containing while loop, cheers.

  3. Okay, that’s the code of Bubble sort by using While Loop written in C++.

    while(i < 4) { int j = 0; while(j < 4) { if(array[j]>array[j+1])
    {
    hold=array[j];
    array[j]=array[j+1];
    array[j+1]=hold;
    }
    j++;
    }
    i++;
    }

    If you have any other questions then let me know, thanks.

  4. yes we can use a while loop.

  5. thanks for pointing out.

  6. thanks for pointing out !!!