Confused by VR? You’re not alone. Technology has been taking giant, confident leaps over the last few years, pulling us along with it at a speed some of us ...
Windows Backup and Recovery is a tool for Windows system backup and file backup. In some forums, some users reported that they received a "backup failure" ...
If there’s one skill you won’t regret learning now, that would be Java programming. Java is everywhere – and it is here to stay! It is used in the simplest ...
Global financial services are powered by fiat currency, meaning paper currency and metallic coins that are backed by Governments and stamped by law as legal ...
There is not even the shred of a doubt that blockchain, the digitally distributed ledger technology, has the potential to change civilization the way the ...
Many organizations are now considering moving their business solutions to the cloud so they won’t get left out. Migrating to the cloud offers advantages to ...
Facebook is one of the social media platforms that multiple businesses use to market their products and services. It continues to prove beneficial for various ...
WordPress is commonly used blogging sites, and it is as simple to use. If you are about to start your first WordPress blog, then all you have to do is make ...
Traditionally, businesses have been offered two options: PaaS (Platform as service) and IaaS (Infrastructure as a service). They vary significantly in what ...
Do you have an aggressive online and/or offline marketing campaign that just isn’t bringing in the goods? Maybe you’re effective at reaching your existing ...
Consumer technology in the retail sector has come a long way in a short amount of time. While mechanical cash registers and manual inventory systems were the ...
UX designers have recognized the value of animated videos ever since they became light and accessible to use in mobile environments. Animations ...
- « Previous Page
- 1
- 2
- 3
- 4
- 5
- 6
- …
- 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 !!!