Search:

Type: Posts; User: Thor

Search: Search took 0.08 seconds.

  1. Thread: Array Histogram

    by Thor
    Replies
    9
    Views
    1,985

    h

    Can somebody take another look at this, please? I'm losing my mind trying to figure this out.
  2. Thread: Array Histogram

    by Thor
    Replies
    9
    Views
    1,985

    Re: Array Histogram

    Thanks for your help so far.

    I think I'm trying to use parallel arrays. Am I initializing them correctly in my code? I believe that's where I'm getting errors.
  3. Thread: Array Histogram

    by Thor
    Replies
    9
    Views
    1,985

    Re: Array Histogram

    I know that the longest String in the file I'm using is 26 characters, but I can't just create the array specific to the Strings in this file because I need it to work with any file.
  4. Thread: Array Histogram

    by Thor
    Replies
    9
    Views
    1,985

    Re: Array Histogram

    Unfortunately, I don't know how to use a Map.

    I need the program to determine the max String length, can I do that using the process you described? If I'm understanding correctly, I think that's...
  5. Thread: Array Histogram

    by Thor
    Replies
    9
    Views
    1,985

    Array Histogram

    Hello, I'm having trouble coding a program which reads in strings (search terms) from a file, orders them, and then creates a histogram showing the occurrence of each string length.

    For example,...
  6. Thread: printf error

    by Thor
    Replies
    3
    Views
    1,691

    [SOLVED] Re: printf error

    Thanks a lot! That makes too much sense for me to have thought of it haha
  7. Thread: printf error

    by Thor
    Replies
    3
    Views
    1,691

    [SOLVED] printf error

    Hello again, I finished my code and it works fine (it's far from elegant), but when I tried to format the printing of a few values, I started getting errors.

    Here is the code (errors occur after...
  8. Replies
    13
    Views
    2,003

    [SOLVED] Re: While loop won't allow variable to change

    Honestly I have no idea, but they're gone now. I put everything in and it didn't work, so I posted that reply, but just now I put everything back in to see what the error message was and it works...
  9. Replies
    13
    Views
    2,003

    [SOLVED] Re: While loop won't allow variable to change

    jps, I think I would be fine if I could just get the while loop to work. The logic isn't complicated, but it won't function at all if I can't get information entered for more than one troop.
  10. Replies
    13
    Views
    2,003

    [SOLVED] Re: While loop won't allow variable to change

    curmudgeon, that didn't do anything for me, I just got errors. Thanks for the idea!
  11. Replies
    13
    Views
    2,003

    [SOLVED] Re: While loop won't allow variable to change

    This is for my programming class, yes. I edited my first post to include instructions.
  12. Replies
    13
    Views
    2,003

    [SOLVED] Re: While loop won't allow variable to change

    I'll need to print the total and average sale of the troops overall and then the troop which sold the least and the troop which sold the most. This is all printed after input is finished, so I guess...
  13. Replies
    13
    Views
    2,003

    [SOLVED] Re: While loop won't allow variable to change

    Both. I ask for the name before/outside of the loop to provide a condition, then at the end of the loop, ask for the name again in order to provide a chance for the condition to change. If the name...
  14. Replies
    13
    Views
    2,003

    [SOLVED] While loop won't allow variable to change

    Hi, I'm having a problem with a code which is supposed to read in values for the number of boxes of cookies sold by girl scouts and compute the total money collected for each troop. It must work for...
Results 1 to 14 of 14