Search:

Type: Posts; User: gratiafide

Page 1 of 4 1 2 3 4

Search: Search took 0.01 seconds.

  1. Okay but then it instantly goes into an infinite...

    Okay but then it instantly goes into an infinite loop....... he needs to make it meaningful by allowing the "i" variable to change in his loop, as your nice for loop shows.
  2. You also need to initialize your "i" variable to...

    You also need to initialize your "i" variable to a value of your choice before it starts testing its value in the while loop condition (i>o), but i is not defined at this point as anything meaningful.
  3. You need to do make your "i" variable in your...

    You need to do make your "i" variable in your while loop change every time you put a new number in it. Then, when you are trying to print your array out backwards, you need another similar while...
  4. Replies
    19
    Views
    2,558

    hmmm I'm still getting errors trying to compile...

    hmmm I'm still getting errors trying to compile this guy's code.

    C:\Program Files (x86)\PellesC\Projects\game\main.c(36): warning #2027: Missing prototype for 'getch'.

    C:\Program Files...
  5. Replies
    19
    Views
    2,558

    What does srand do? I get errors from it and...

    What does srand do? I get errors from it and can't compile the code.
  6. This sounds like a fun assignment, quite frankly.

    This sounds like a fun assignment, quite frankly.
  7. You should post some of this information so we...

    You should post some of this information so we can see how it might be adjusted to include hidden data.
  8. Thread: EOF help

    by gratiafide
    Replies
    10
    Views
    1,169

    My final code for your programming delight: ...

    My final code for your programming delight:


    #include <stdio.h>
    #include <stdlib.h>
    #include <ctype.h>

    int main()
    {
    char ch;
  9. Thread: EOF help

    by gratiafide
    Replies
    10
    Views
    1,169

    Both my codes were okay as long as I hit enter...

    Both my codes were okay as long as I hit enter first, and then hit ctrl-Z
  10. Thread: EOF help

    by gratiafide
    Replies
    10
    Views
    1,169

    Uh, actually is doesn't. I have to hit enter and...

    Uh, actually is doesn't. I have to hit enter and THEN control-z.
  11. Thread: EOF help

    by gratiafide
    Replies
    10
    Views
    1,169

    I appreciate the help guys, but one strange thing...

    I appreciate the help guys, but one strange thing is that this similar loop (that I also wrote for another problem) works okay with the EOF as far as I can tell.


    #include <stdio.h>
    #include...
  12. Thread: EOF help

    by gratiafide
    Replies
    10
    Views
    1,169

    EOF help

    Why can't I hit ctrl-Z just once to exit from my while loop?

    The first time I hit ctrl-Z, my debugger says it has a value of ASCII 32, or a blank space.

    If I hit ctrl-Z twice in a row, then...
  13. Replies
    4
    Views
    1,034

    ok, now \\n (file://\\n) seems to be working. i...

    ok, now \\n seems to be working. i swear it wasn't a second ago.
  14. Replies
    4
    Views
    1,034

    My textbook is trying to torture me

    How do I print "\n" or "\t"? Apparently neither \n nor \\n work.

    :mad::mad::mad::mad::mad:
  15. Would it work to do a loop that continually adds...

    Would it work to do a loop that continually adds itself up by 1 until it reaches the first & largest digit of the array, and then adds itself up until it reaches the 2nd digit of the array, and then...
  16. Replies
    3
    Views
    5,593

    I suspected something like this... I was hoping...

    I suspected something like this... I was hoping to not have to manually enter all 31 entries though in a giant switch statement. Thanks!
  17. Replies
    3
    Views
    5,593

    A way to print the control characters?

    Is there a way to print the control characters (0 to 31 decimal in ASCII) so that you can actually see the control character on the output screen? I'm talking about the "upwards carrot" and the...
  18. Replies
    10
    Views
    1,876

    I really appreciate all the effort put into these...

    I really appreciate all the effort put into these posts. I keep thinking there is an easy way to do these things and it usually seems it is not so easy. It will take me a while to digest all this...
  19. Replies
    10
    Views
    1,876

    Ignore my wrong equals sign. tester==0

    Ignore my wrong equals sign. tester==0
  20. Replies
    10
    Views
    1,876

    How about this? float num_check (int tester,...

    How about this?


    float num_check (int tester, float num_entd)
    {

    while((num_entd>1000) || (num_entd<0) || tester=0)
    {
    printf("Please enter a valid weight between 0...
  21. Replies
    10
    Views
    1,876

    I am sending in a float value though. Are you...

    I am sending in a float value though. Are you saying I can just get rid of the (float num_entd) even though I'm sending in a float?

    Unfortunately, I don't yet know any of those commands :(
  22. Replies
    10
    Views
    1,876

    Safeguarding against non-numerical input

    What can I add to my function that will make sure only numerical input is added? This is not for homework.


    float num_check (float num_entd)
    {
    while((num_entd>1000) || (num_entd<0))
    ...
  23. Replies
    31
    Views
    4,057

    I think Nominal's point is that there are times...

    I think Nominal's point is that there are times where C or C++ are better situated for a project, and he also is saying that you probably could do a great many projects in either C or C++ equally...
  24. Replies
    31
    Views
    4,057

    Thanks - yeah, Australia might be a bit too far...

    Thanks - yeah, Australia might be a bit too far away for me. I live in Mississippi, and I didn't even want to pursue a position in Atlanta!
  25. Replies
    31
    Views
    4,057

    That was really well written, Nominal Animal. I...

    That was really well written, Nominal Animal. I thought it was interesting that you mentioned the open-source issue as a contrast between the two languages. It reminded me of the movie Tron. They...
Results 1 to 25 of 99
Page 1 of 4 1 2 3 4