Forum: C++ Aug 31st, 2008 |
| Replies: 1 Views: 456 How do I sort 10 random numbers using quick sort with push() and pop() ? |
Forum: C++ Aug 30th, 2008 |
| Replies: 13 Views: 2,273 Yes I am a beginner, just started taking C++ 2 weeks ago. I got the program to work but can't sort it.
#include<iostream>
using namespace std;
void BubbleSort(int ar[10],int n, int... |
Forum: C++ Aug 30th, 2008 |
| Replies: 13 Views: 2,273 #include<iostream>
using namespace std;
void BubbleSort(int ar[10], int n, int & compare_costs, int & swap_costs)
{
int t; int swaps=-1;
while(swaps)
{
... |
Forum: C++ Aug 30th, 2008 |
| Replies: 13 Views: 2,273 |
Forum: C++ Aug 30th, 2008 |
| Replies: 13 Views: 2,273 how do i indent ? i press tab and it just tabs over to the reply button |
Forum: C++ Aug 30th, 2008 |
| Replies: 13 Views: 2,273 #include<iostream>
using namespace std;
void BubbleSort(int ar[10], int n, int & compare_costs, int & swap_costs)
{
int t; int swaps=-1;
while(swaps)
{
... |
Forum: C++ Aug 30th, 2008 |
| Replies: 13 Views: 2,273 When I run the program it appears:
83 86 77 15 93 35 86 92 49 21
83 77 15 86 35 86 92 49 21 62
It is clearly not sorted and 93 appears on the first output but not the second, and 62 is in the... |
Forum: C++ Aug 30th, 2008 |
| Replies: 13 Views: 2,273 #include<iostream>
using namespace std;
void BubbleSort(int ar[10], int n, int & compare_costs, int & swap_costs)
{
int t; int swaps=-1;
while(swaps)
{
... |
Forum: C++ Aug 30th, 2008 |
| Replies: 2 Views: 610 I'm trying to generate 100 random numbers from 1-100 into an array. I can generate the 100 random numbers but don't know how to put it into an array.
#include<iostream>
using namespace std;
... |