Click here to Skip to main content
15,914,417 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Arbitrary - arithmetic precision Pin
nowrocktheworld13-Nov-09 6:31
nowrocktheworld13-Nov-09 6:31 
GeneralRe: Arbitrary - arithmetic precision Pin
nowrocktheworld13-Nov-09 7:55
nowrocktheworld13-Nov-09 7:55 
GeneralRe: Arbitrary - arithmetic precision Pin
Richard MacCutchan13-Nov-09 9:17
mveRichard MacCutchan13-Nov-09 9:17 
GeneralRe: Arbitrary - arithmetic precision Pin
Rajesh R Subramanian13-Nov-09 16:24
professionalRajesh R Subramanian13-Nov-09 16:24 
GeneralRe: Arbitrary - arithmetic precision Pin
nowrocktheworld14-Nov-09 1:20
nowrocktheworld14-Nov-09 1:20 
QuestionBubblesort help Pin
kbury13-Nov-09 4:44
kbury13-Nov-09 4:44 
AnswerRe: Bubblesort help Pin
«_Superman_»13-Nov-09 5:03
professional«_Superman_»13-Nov-09 5:03 
AnswerRe: Bubblesort help Pin
David Crow13-Nov-09 5:06
David Crow13-Nov-09 5:06 
First, format your code so that it is easier to read. Use the <pre> tags for this. Second, break your code up into three functions instead of two: fill, sort, and print.

As far as printing, check the two for() loops in printArray().

In the end, you should end up with something resembling:

void fillArray( int N[], int T )
{
    for (int P = 0; P < T; P++)
        N[P] = (int) (rand() % 52 + 1);
}
  
void sortArray( int N[], int T )
{
}
  
void printArray( int N[], int T )
{
    printf("LOTTO PICKS\n");
  
    for (int P = 0; P < T; P++)
        printf("%d\n", N[P]);
}
  
void main( void )
{
    srand(time(NULL));
  
    int PICKED[] = {0,0,0,0,0,0};
  
    fillArray(PICKED, SIZE);
    sortArray(PICKED, SIZE);
    printArray(PICKED, SIZE);
}


"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown

"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons


GeneralRe: Bubblesort help Pin
kbury13-Nov-09 6:37
kbury13-Nov-09 6:37 
QuestionRe: Bubblesort help Pin
David Crow13-Nov-09 6:40
David Crow13-Nov-09 6:40 
AnswerRe: Bubblesort help Pin
kbury13-Nov-09 6:48
kbury13-Nov-09 6:48 
QuestionRe: Bubblesort help Pin
David Crow13-Nov-09 7:42
David Crow13-Nov-09 7:42 
GeneralRe: Bubblesort help Pin
CPallini13-Nov-09 7:13
mveCPallini13-Nov-09 7:13 
GeneralRe: Bubblesort help Pin
kbury13-Nov-09 7:23
kbury13-Nov-09 7:23 
GeneralRe: Bubblesort help Pin
CPallini13-Nov-09 8:05
mveCPallini13-Nov-09 8:05 
Questionhow can i retrieve the desitnation path of the icons on the desktop Pin
nenfa13-Nov-09 2:02
nenfa13-Nov-09 2:02 
AnswerRe: how can i retrieve the desitnation path of the icons on the desktop Pin
David Crow13-Nov-09 3:12
David Crow13-Nov-09 3:12 
GeneralRe: how can i retrieve the desitnation path of the icons on the desktop Pin
nenfa14-Nov-09 20:27
nenfa14-Nov-09 20:27 
AnswerRe: how can i retrieve the desitnation path of the icons on the desktop Pin
David Crow15-Nov-09 8:28
David Crow15-Nov-09 8:28 
AnswerRe: how can i retrieve the desitnation path of the icons on the desktop Pin
«_Superman_»13-Nov-09 5:04
professional«_Superman_»13-Nov-09 5:04 
GeneralRe: how can i retrieve the desitnation path of the icons on the desktop Pin
nenfa14-Nov-09 20:25
nenfa14-Nov-09 20:25 
AnswerRe: how can i retrieve the desitnation path of the icons on the desktop Pin
nenfa14-Nov-09 22:18
nenfa14-Nov-09 22:18 
QuestionHow To Overcome DEBUG ASSERTION FAILED In VC++ Pin
ram8413-Nov-09 0:31
ram8413-Nov-09 0:31 
AnswerRe: How To Overcome DEBUG ASSERTION FAILED In VC++ Pin
Rajesh R Subramanian13-Nov-09 0:54
professionalRajesh R Subramanian13-Nov-09 0:54 
GeneralRe: How To Overcome DEBUG ASSERTION FAILED In VC++ Pin
CPallini13-Nov-09 3:29
mveCPallini13-Nov-09 3:29 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.