Search:

Type: Posts; User: astro_not

Search: Search took 0.01 seconds.

  1. Replies
    2
    Views
    1,542

    Thank you, Salem. I see. I have to write to...

    Thank you, Salem.
    I see. I have to write to each element separately, rather than attempt to refernce a 'row' or 'set' of elements. Thank you for your help. I think I can work that out.

    After...
  2. Replies
    5
    Views
    989

    a better solution is enum since enum is a...

    a better solution is enum since enum is a 'relabel' of integers. By assigning Roman numeral symbols to underlying integers, they can be sorted anytime by their integer value.
  3. Replies
    2
    Views
    1,542

    simplify

    I tried to simplify by avoiding passing to a function :



    /*for(u = 1; u < FLIGHT; ++u)
    for(v = FLIGHT; u < v; --v)
    if(scorecard[v-1][4] < scorecard[v][4])


    temp[5] =...
  4. Replies
    2
    Views
    1,542

    sort 2D array

    I would like to sort a 2D array[3][5] of float in descending order based on the last 'cell' e.g. [0][4], [1][4], . . .




    . . .
    scorecard[i][j] = ttl_pts; // load array

    for(u =...
  5. Replies
    5
    Views
    989

    Looks like I need to study strncmp and strcmp...

    Looks like I need to study strncmp and strcmp functions.

    Here is where I am starting:



    for (i = 0; (i <= length - 1); i++)
    if (strncmp(codes[i], roman[i], length))
    {...
  6. Replies
    5
    Views
    989

    this looks like the concept I am looking for. As...

    this looks like the concept I am looking for. As I said, pointers are over the horizon for me still. I see how your statement creates a pointer to a character array with elements ordered by value...
  7. Replies
    5
    Views
    989

    yes, VC would be incorrect input. I can report...

    yes, VC would be incorrect input. I can report an input error, or I can suggest CV as the proper input. Any response appears to require the same processing from the function.
    Keith
  8. Replies
    5
    Views
    989

    Thank you for looking at this with me Salem. I...

    Thank you for looking at this with me Salem. I appreciate your time.

    I am sorting input of a character string of Roman Numerals, where I want to validate input as being in proper order.
    ...
  9. Replies
    5
    Views
    989

    sort by . . .

    I would like to sort a set of characters by other than their ascii sequence: Roman Numeral characters. I have not conceived an alogrithm to work from.

    I tried reading the char array and...
  10. Thread: Loop control

    by astro_not
    Replies
    5
    Views
    2,035

    scanf FIXED

    These changes made a vast improvment in the functionality and operability of the display screen that caused me a problem using scanf. My thanks to SALEM for assisting with specific code and...
  11. Thread: Loop control

    by astro_not
    Replies
    5
    Views
    2,035

    clear input buffer

    Salem,
    Thank you, I did not realize that the input stream needs to be cleared. I very much appreciate you writing -- taking time to reply. This gives me the direction needed to understand what is...
  12. Thread: Loop control

    by astro_not
    Replies
    5
    Views
    2,035

    revised

    thanks pinko,
    I updated the type of status to char and revised the notation on the scanf line. There must be a logic error. I am thinking that the for(status='0'; status !='q'; ) line at the...
  13. Thread: Loop control

    by astro_not
    Replies
    5
    Views
    2,035

    Loop control

    I do not understand how to pause my display loop. I thought the second scanf would do the job, but it doesn't. Here is the code


    int main ()
    {
    int op1; // user input operand1
    int...
Results 1 to 13 of 13