Search:

Type: Posts; User: h_dog

Search: Search took 0.00 seconds.

  1. Replies
    13
    Views
    2,212

    hhhhhhhhh cryptic horror, just wanted to show...

    hhhhhhhhh cryptic horror, just wanted to show that it doesn't have to be so long.
  2. Replies
    13
    Views
    2,212

    const int num_rows = 5; it is better practice to...

    const int num_rows = 5;
    it is better practice to use #define 5 N


    printf("i*j\t", column);
    printf("i*j\t", row *column);

    I don't know what u expect this to do.
  3. Replies
    13
    Views
    2,212

    wow your code is very long, and not vary...

    wow your code is very long, and not vary readable, here is what I would do:


    int i;
    for(i=0; i<25; i++){
    printf(" %-1d*%-1d=%-2d %c", (i/5)+1, (i%5)+1, ((i/5)+1)*((i%5)+1),...
  4. Thread: calculating e

    by h_dog
    Replies
    11
    Views
    2,736

    This is not the way to calculate e, first of all...

    This is not the way to calculate e, first of all you will end up with 1/n and you don't need the loop. You must first write a function that calculates the factorial of x " fact(x) " and then change:...
  5. Thread: damn shell sort

    by h_dog
    Replies
    14
    Views
    2,187

    thanks

    thanks
  6. Thread: damn shell sort

    by h_dog
    Replies
    14
    Views
    2,187

    Yes, of course any help is appreciated, although...

    Yes, of course any help is appreciated, although the java on my pc is not working properly so I am not sure whether it will work
    but ye, thanks
  7. Thread: damn shell sort

    by h_dog
    Replies
    14
    Views
    2,187

    My point is: if the reason for not using this...

    My point is: if the reason for not using this method is because of what you said, then I am explaining to you that I am aware of that. And the only reason I used it is because this is a special case...
  8. Thread: damn shell sort

    by h_dog
    Replies
    14
    Views
    2,187

    oh, that's no problem it is meant to work with...

    oh, that's no problem it is meant to work with positive integers < 100
  9. Thread: damn shell sort

    by h_dog
    Replies
    14
    Views
    2,187

    hi

    thanks for answering so quickly. the wiki article is not so clear and it is hard to understand their pseudo code. In fact surprisingly, a Google search on the subject did not yield anything helpful,...
  10. Thread: damn shell sort

    by h_dog
    Replies
    14
    Views
    2,187

    damn shell sort

    Hi. guys.
    I am trying to implement shell sort which is, to my understanding, just a bubble sort with gaps. This is what I wrote :



    int shellSort(int *arr, int n){
    int i=0, j;
    ...
Results 1 to 10 of 10