Search:

Type: Posts; User: Adak

Page 1 of 20 1 2 3 4

Search: Search took 0.11 seconds.

  1. Replies
    38
    Views
    5,387

    Yes! And since there is ALWAYS another empty...

    Yes!

    And since there is ALWAYS another empty square in this pirouette pattern, until they're all full, only one loop is needed.
  2. Replies
    8
    Views
    18,410

    How do you want to ignore them, and when? If I...

    How do you want to ignore them, and when?

    If I gave you a list of numbers with some negative numbers to be ignored, and you had no computer, how would you go about ignoring those negative numbers...
  3. Replies
    38
    Views
    5,387

    Run my program. Your position in the array has to...

    Run my program. Your position in the array has to move all four directions: up, right, down and left. You need only one loop, but you need some kind of logic to control the movement in all four...
  4. Replies
    38
    Views
    5,387

    OK, Mr. Dancer! Anything else you'd like to tell...

    OK, Mr. Dancer! Anything else you'd like to tell us? <ROFL>
  5. Replies
    8
    Views
    1,427

    You could put a, b, *recs, and rectangle[50], all...

    You could put a, b, *recs, and rectangle[50], all on the same line of code, since they are all RecT's data type.
  6. Replies
    18
    Views
    2,930

    You posted: Which looks like three different...

    You posted:


    Which looks like three different rates to me.

    The only way to learn this, is by doing it. Take a paper and pencil, and work through some simulated rental costs, for different...
  7. Replies
    8
    Views
    1,427

    It's smart to take it step by step, compiling...

    It's smart to take it step by step, compiling every few lines to check the syntax. You CAN have structs defined inside a function, but then you can't easily make an instance of the struct, inside the...
  8. Replies
    38
    Views
    5,387

    You can control the movement through the array,...

    You can control the movement through the array, with just one loop, but in noting how simple it was in pseudo code, I probably misled you as to the actual code.

    You're on the right track, but...
  9. Replies
    38
    Views
    5,387

    Holy Moley! It's not a different function for...

    Holy Moley!

    It's not a different function for every direction - it's one loop, with one turn, when you can't go straight in the direction you are traveling now, and loop.
  10. Replies
    38
    Views
    5,387

    DING! DING! DING! Winner winner, chicken dinner!...

    DING! DING! DING! Winner winner, chicken dinner! :)
  11. Replies
    8
    Views
    1,427

    I beg to differ, Roadrunner - it makes me feel...

    I beg to differ, Roadrunner - it makes me feel SOO GOOOD! <j/k>

    problem #1:

    1) Is the struct definition, above main(), before any other functions? If not, make it so.

    2) Move the declaration...
  12. Replies
    38
    Views
    5,387

    You can use either a for or a while or a do while...

    You can use either a for or a while or a do while loop. They all can be made to work in place of the other. I like the for loop for this one.

    You turn right on square one, and enter the loop.

    ...
  13. Replies
    38
    Views
    5,387

    Nothing wrong with that approach, but it's more...

    Nothing wrong with that approach, but it's more code. This algorithm minimizes BEAUTIFULLY, if you let it. WAY EZ.
  14. Replies
    18
    Views
    2,930

    If you don't need to add taxes, etc., then LEAVE...

    If you don't need to add taxes, etc., then LEAVE THAT PART OUT. You WILL need to calculate at least three different rates, however. Your calculations MUST be similar to what I wrote above.

    This is...
  15. Replies
    38
    Views
    5,387

    NO! God NO! Don't start counting steps! :( ...

    NO! God NO! Don't start counting steps! :(

    It's simple, in one loop, you have two if statements. The loop ends when there are no vacant squares left. It's EZ!

    Yes, I made a maze solver program...
  16. Replies
    18
    Views
    2,930

    There isn't just ONE WAY to make this...

    There isn't just ONE WAY to make this calculation. ATM, I'd look to changing all the time intervals into minutes. Lots of them, won't both the computer at all.

    Then see, how many (if any) minutes...
  17. Replies
    38
    Views
    5,387

    Follow the "right hand rule": 1. Start by...

    Follow the "right hand rule":

    1. Start by going right, as far as you can. Put a unique "have been there" value, into each square of the array, you have visited.

    2. When you can no longer move...
  18. Replies
    18
    Views
    2,930

    You are doing the time calculation yourself - so...

    You are doing the time calculation yourself - so you don't need time.h. time.h is used mostly when your program needs to work with the reported times from the computer.

    You can keep all your...
  19. Replies
    35
    Views
    4,555

    The only reason I'm able to help you Juan, is...

    The only reason I'm able to help you Juan, is because you have posted some code. That's a rule on the forum, because otherwise we become the "short order" center for students to get their homework...
  20. Replies
    35
    Views
    4,555

    Sure, are you using a while loop? As the while...

    Sure, are you using a while loop? As the while loop moves up the array of top names, each name can be strcpy()'d down to the next index number. array[98], becomes array[99], then array[97] is...
  21. Replies
    35
    Views
    4,555

    Yes indeed. the char array[10][20], can be...

    Yes indeed. the char array[10][20], can be printed out with


    for(i=0;i<10;i++)
    printf("%s\n",array[i]);


    which is a very handy way to print out strings. Replace the printf() line of code...
  22. Replies
    35
    Views
    4,555

    To save a list of names, you would need a two...

    To save a list of names, you would need a two dimensional array (length and width).

    Instead of name1[10] which is one dimensional, you need names[10][20]. That would give you room for ten names,...
  23. Replies
    35
    Views
    4,555

    I like your idea Juan. Why not try it out with...

    I like your idea Juan. Why not try it out with say, 20 names, and keep the lowest 10 of them, in an array. Work through the details of the code, and then jump it up to the million names, and 100...
  24. Replies
    9
    Views
    3,750

    Not all boards are using chipsets that support...

    Not all boards are using chipsets that support the HPET fully, yet. MS is providing some software support for them, and for legacy users of it's older Multimedia timer as well, but it has become...
  25. Replies
    14
    Views
    2,367

    The problem is where you change over from...

    The problem is where you change over from fscanf() to fgets(). fscanf() scans and saves (hopefully) the file data UP TO BUT NOT INCLUDING, the newline char. So when fgets() begins saving data, it...
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4