Nowadays augmented reality has stroked the world with the invention of its devices. Augmented reality is a tool which is inspiring the real world with digital ...
One of the chief perplexities of today’s technology is virtual and augmented realities. Mutually, they are gaining a great deal of consideration from media. In ...
Nowadays, technology is emerging so fast that it is difficult to choose which Smartphone to buy. Purchasing a Smartphone is just like purchasing a car. ...
ArrayLists have been used by programmers since the late 90’s. They were implemented to be more flexible collections than arrays. They are implemented in many ...
Files are used to save or retrieve data from storage devices, e.g. we can store certain information in a text file and later on, can use that information. ...
Google play store is a platform which has a vast variety of Android apps. It allows us to install any application we want in our mobile phones. There was a ...
Now more and more users need to BYOD, for this situation, Microsoft has released a new feature called Windows To Go in the Enterprise Edition of Windows 10 and ...
A game engine is a kind of software that aims for the formation and progress of video games. It is employed for designing games for computers, mobiles and ...
Polymorphism is the capability to use an operator or method in different ways. Polymorphism gives the different function to the operators or methods. ...
Now a days, ad networks are very prevalent among people for online earning purposes. In them, Google AdSense is the world’s leading ad network through which ...
AOMEI Backupper is a Windows backup software released by AOMEI Technology. Compare to Windows built-in backup program, AOMEI Backupper has more functions and ...
There are certain logos like Apple’s or Nike’s that are highly successful and lasting that they come to your mind just by merely mentioning the brand name. So ...
- « Previous Page
- 1
- …
- 5
- 6
- 7
- 8
- 9
- 10
- Next Page »
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.
I have updated my comment with a code block containing while loop, cheers.
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.
yes we can use a while loop.
Welcome
thanks for pointing out.
my pleasure :)
thanks for pointing out !!!