Search:

Type: Posts; User: Norm

Search: Search took 0.11 seconds.

  1. Thread: Array Issues

    by Norm
    Replies
    20
    Views
    1,935

    Re: Array Issues

    Here's a sample of pseudo code for some program:
    begin loop
    ask user for input
    read input
    test that input is valid
    if not valid go to top of loop and ask again
    process input
    add input to list...
  2. Thread: Array Issues

    by Norm
    Replies
    20
    Views
    1,935

    Re: Array Issues

    Please read my last post, we crossed.
  3. Thread: Array Issues

    by Norm
    Replies
    20
    Views
    1,935

    Re: Array Issues

    Use an if statement to test the value entered against the preset value and if equal, use the break statement to exit the loop.

    The order of the statements in the program do not make any sense....
  4. Thread: Array Issues

    by Norm
    Replies
    20
    Views
    1,935

    Re: Array Issues

    The middle number would be found by some formula like: (the count of numbers entered+1/2) with a test if there are an even count and then there would be two middle numbers.
    An example: with 6...
  5. Thread: Array Issues

    by Norm
    Replies
    20
    Views
    1,935

    Re: Array Issues

    Still not clear what you are trying to do with an array. Given an array, by your definition, the middle can be found from the length of the array.
    Where do the guessed numbers get involved?
    Can...
  6. Thread: Array Issues

    by Norm
    Replies
    20
    Views
    1,935

    Re: Array Issues

    Not sure what those mean. The "middle" number(s) is a function of the size of the array. There is no need for guessed numbers to find it.
  7. Thread: Array Issues

    by Norm
    Replies
    20
    Views
    1,935

    Re: Array Issues

    Which is the middle element in an array with an even number of elements?
  8. Thread: Array Issues

    by Norm
    Replies
    20
    Views
    1,935

    Re: Array Issues

    Your example is an array with an odd number of elements. What if there are an even number?
    Is the middle element = (array.length+1)/2

    Or are you talking the the value of the element?
  9. Thread: Array Issues

    by Norm
    Replies
    20
    Views
    1,935

    Re: Array Issues

    Can you define what a "middle number" is? Perhaps give an example.
Results 1 to 9 of 9