Search:

Type: Posts; User: Amberlampz

Page 1 of 2 1 2

Search: Search took 0.00 seconds.

  1. Replies
    19
    Views
    14,555

    float grades[10] You're telling the system to...

    float grades[10]

    You're telling the system to create an array of 10 floats containing indexes 0 through 9.


    for ( i = 1; i <= 10; ++i )

    And you're now telling the system to iterate from the...
  2. Aye, I think I got reverse-confused :P. Thanks...

    Aye, I think I got reverse-confused :P. Thanks for pointing out my error. Still, I would probably avoid having both floats and doubles(just for less confusion's sake) unless there's a convincing...
  3. You're printing out doubles as floats. edit:...

    You're printing out doubles as floats.

    edit: grumpy corrected error
  4. Read about how to write a main function and while...

    Read about how to write a main function and while loops.
  5. Replies
    6
    Views
    1,639

    Considering you're not returning anything (and...

    Considering you're not returning anything (and you're using void main :(), it should be getting garbage values/runtime error/etc. I don't know about your compiler(s), but it may just be "correcting"...
  6. Replies
    13
    Views
    2,038

    Make sure you're completely clear about your...

    Make sure you're completely clear about your instructions (considering an assignment like this does not seem reasonable for any class in C). I would think it easier to "pass two dimensions" if you...
  7. Replies
    6
    Views
    24,925

    This is wrong: for(i=0;i

    This is wrong:


    for(i=0;i<5;i++)
    {
    for(j=0;j<5;j++)
    if(a[i]==a[j])
    {
    freq++;
    }
  8. Replies
    1
    Views
    921

    C File I/O Tutorial - Cprogramming.com...

    C File I/O Tutorial - Cprogramming.com

    Read this. You're opening the file in write mode in both instances.
  9. Replies
    11
    Views
    4,603

    In addition to what's being mentioned, you don't...

    In addition to what's being mentioned, you don't need math.h and you should get rid of the elseif() and just change it to a single if() statement.
  10. Replies
    3
    Views
    1,201

    Look at line 27.

    Look at line 27.
  11. Thread: C Homework

    by Amberlampz
    Replies
    29
    Views
    4,208

    Try to break your code up into individual...

    Try to break your code up into individual functions. Your teacher is really, really not going to like you if everything is plugged into main. It also helps a ton for you, because you can figure out...
  12. Thread: C Homework

    by Amberlampz
    Replies
    29
    Views
    4,208

    If you've taken two courses in Java I don't see...

    If you've taken two courses in Java I don't see how this could be so difficult. You've covered far more extensive and difficult topics than what this asks of you. The thing that might be a little...
  13. Thread: C Homework

    by Amberlampz
    Replies
    29
    Views
    4,208

    C, C++ Programming Tutorials - Cprogramming.com...

    C, C++ Programming Tutorials - Cprogramming.com

    Start reading, I guess. You've got a long way to go syntactically if you don't know how to input values from the keyboard.

    As far as mode...
  14. Replies
    28
    Views
    3,134

    His criticism isn't unwarranted. Tater is...

    His criticism isn't unwarranted. Tater is pointing out things in your code that are likely to cause an error and asking you to fix them. It could very well be the case that the problem resides in...
  15. Replies
    28
    Views
    3,134

    Something I read elsewhere: "Define a 10...

    Something I read elsewhere:

    "Define a 10 character buffer and gets() will happily accept the Declaration of Independance as its input."

    It may not be a problem right now, but you're absolutely...
  16. Replies
    39
    Views
    4,555

    I'm curious why a final project is accepted...

    I'm curious why a final project is accepted without modular code or good format, but eh.
  17. I was about to test this myself and see if I...

    I was about to test this myself and see if I could find the error, but it's good to know that you figured it out. I'm not exactly what you'd call a coding guru, but I think it would definitely help...
  18. Replies
    12
    Views
    1,459

    Wow. It's almost hilarious how the simpler...

    Wow. It's almost hilarious how the simpler answers are the hardest to come by. After sleeping on it I deduced that pointers wouldn't really be needed unless I wanted to over-complicate things. ...
  19. Replies
    12
    Views
    1,459

    Noted, and thanks. Given any set of...

    Noted, and thanks.



    Given any set of numbers stored in an array, I compare an array index with the one above it, and if they're equal I increment a counter. These counter values are then...
  20. Replies
    12
    Views
    1,459

    Unfortunately the compiler I'm using is Visual...

    Unfortunately the compiler I'm using is Visual Studio 2010 (and they apparently have no plans to implement it). Is there a workaround, or would you suggest another compiler?



    Not quite. I'm...
  21. Replies
    12
    Views
    1,459

    Thanks for the quick response. Hmmmm. I'm...

    Thanks for the quick response. Hmmmm. I'm afraid I don't quite understand what you mean. I went ahead and changed some things around to make it simpler, though.


    void hurrmode (int array[],...
  22. Replies
    12
    Views
    1,459

    Calculating Mode

    Hello again. I'm looking to calculate a mode in an array, but I've run into a few problems with the syntax. I believe my general methodology would work well, though:

    1. Go through the array
    2....
  23. Hey, look at that; I'm retarded. Program...

    Hey, look at that; I'm retarded.

    Program works. Thanks for the help!
  24. Thanks for the quick response. Okay, so making...

    Thanks for the quick response.

    Okay, so making those changes and adding the printf in the function makes it look like this:


    void hurrdurr (int array[], int size)
    {
    int i, j;
    for (i = 0;...
  25. [General Help][SOLVED] Dynamic Arrays and General Pointer syntax

    Hello, before I go further I would like to state that this is not for a homework assignment, but I would still prefer if I wasn't given the answer right off the bat. My goal is to write a very...
Results 1 to 25 of 26
Page 1 of 2 1 2