Search:

Type: Posts; User: yacek

Page 1 of 3 1 2 3

Search: Search took 0.02 seconds.

  1. Replies
    3
    Views
    1,380

    I'd rather not post the exact code but I will...

    I'd rather not post the exact code but I will describe it.



    char stream[STORAGE];

    for(;;) { /* repeat until done */
    (void) printf("p2: "); ...
  2. Replies
    3
    Views
    1,380

    argv shell execvp

    I'm coding a shell. . .
    I have a
    char *newargv[MAX];

    I am able to get the newargv array to point to words when inputted in the program. For instance a user inputting "echo something 2 3"...
  3. Replies
    2
    Views
    1,145

    I agree, and thanks for the help :)

    I agree, and thanks for the help :)
  4. Replies
    2
    Views
    1,145

    Making a Game Assignment

    The assignment is to create three different raceways and populate them with obstacles, N = waves in Seaway, M = oil in Raceway, and O = fog in Airway. Three different vehicles on three different...
  5. Thread: Sorting strings

    by yacek
    Replies
    2
    Views
    2,012

    OK, will check that out. Thanks.

    OK, will check that out. Thanks.
  6. Thread: Sorting strings

    by yacek
    Replies
    2
    Views
    2,012

    Sorting strings

    Any ideas for how to sort strings, check the code I commented out here it was my attempt at comparing strings. in printOrder function.


    /*

    My name is Jack Trocinski

    */

    #include <stdio.h>
  7. Thread: Print from file

    by yacek
    Replies
    3
    Views
    1,289

    nope, that's not it.

    nope, that's not it.
  8. Thread: Print from file

    by yacek
    Replies
    3
    Views
    1,289

    Print from file

    I'm trying to get this code to print from a file data.txt which is in my c folder... it's compiling without errors or warnings, anyone see what could be wrong? As soon as I run the program prints...
  9. Thread: Mode of an array

    by yacek
    Replies
    14
    Views
    3,638

    might be some bugs though still... :/

    might be some bugs though still... :/
  10. Thread: Mode of an array

    by yacek
    Replies
    14
    Views
    3,638

    This code will calculate the mode for a set of...

    This code will calculate the mode for a set of data in any range, and will return multiple modes if the set has such. For example the set: 1, 1, 2, 2, 3, 3, 4 will return you modes: 1, 2, 3 since...
  11. Thread: Mode of an array

    by yacek
    Replies
    14
    Views
    3,638

    WOW, finally got it to work with this code... ...

    WOW, finally got it to work with this code... code for the mode, for anyone doing this problem in the future obviously you need to declare everything properly in main:


    for ( i = 0; i < (k-1);...
  12. Thread: Mode of an array

    by yacek
    Replies
    14
    Views
    3,638

    should have posted the full code, sorry bout that...

    should have posted the full code, sorry bout that tabstop.. yes i did set it initially to 0 but not when found a new mode... hmmm, here is the full code anyway... going to play with it.


    /*
    ...
  13. Thread: Mode of an array

    by yacek
    Replies
    14
    Views
    3,638

    Ok you guys im almost there, got the mode to work...

    Ok you guys im almost there, got the mode to work if there is a single mode in the set now I'm trying to get it to work if there are two or more modes in the set... when i enter a set like 2, 2, 3,...
  14. Thread: Mode of an array

    by yacek
    Replies
    14
    Views
    3,638

    Yep, so I ended up getting this code... but it...

    Yep, so I ended up getting this code... but it only works if the set has one mode. How can I get it to work if it has more than that. Look at the code under the comment 'mode'



    /*

    My name...
  15. Thread: Mode of an array

    by yacek
    Replies
    14
    Views
    3,638

    updated code, now when i execute the code it...

    updated code, now when i execute the code it stops after it displays the median data stored... I commented as Mode... also not sure if my mode code is correct. let me know what you guys think. There...
  16. Thread: Mode of an array

    by yacek
    Replies
    14
    Views
    3,638

    Also, I guess this is more of a math question...

    Also, I guess this is more of a math question let's say if we have the data set 1 , 3, 3, 5, 5

    Are 3 and 5 both the mode? If so how can I account for that.
  17. Thread: Mode of an array

    by yacek
    Replies
    14
    Views
    3,638

    No I don't know the range of the values. I...

    No I don't know the range of the values. I already sorted the array in ascending order, OH I see what you mean. Ok, I'm going to try working on that.
  18. Thread: Mode of an array

    by yacek
    Replies
    14
    Views
    3,638

    Mode of an array

    My problem is I have an array filled with some values. I need to find the mode (the number that occurs most often) of the array. I've been thinking about it for a while but no idea, maybe use a for...
  19. Replies
    3
    Views
    4,096

    I see so it needs to return a value. Ok, I'll...

    I see so it needs to return a value. Ok, I'll will play around with this.
  20. Thread: EOF end input

    by yacek
    Replies
    14
    Views
    4,873

    Thanks, you don't know how long that took me to...

    Thanks, you don't know how long that took me to figure out! :)
  21. Thread: EOF end input

    by yacek
    Replies
    14
    Views
    4,873

    finally got it to work with this statement ...

    finally got it to work with this statement


    if ( scanf("%f", &array[i]) != 1 ) break;
  22. Thread: EOF end input

    by yacek
    Replies
    14
    Views
    4,873

    Hmm i thought I had it but it's still not...

    Hmm i thought I had it but it's still not working, doesn't break out of the loop with CTRL-Z. updated code, I added a menu since I'm going to be adding on functions later:


    /*

    My name is Jack...
  23. Thread: EOF end input

    by yacek
    Replies
    14
    Views
    4,873

    I guess it would return a 0. Nice, I got it to...

    I guess it would return a 0. Nice, I got it to work!
  24. Thread: EOF end input

    by yacek
    Replies
    14
    Views
    4,873

    I've been thinking about this all day Grumpy. ...

    I've been thinking about this all day Grumpy. Still no idea how to get CTRL-Z to work.
  25. Thread: EOF end input

    by yacek
    Replies
    14
    Views
    4,873

    Any suggestions, on how to use CTRL-Z to end the...

    Any suggestions, on how to use CTRL-Z to end the input?
Results 1 to 25 of 63
Page 1 of 3 1 2 3