counting occurences

This is a discussion on counting occurences within the C Programming forums, part of the General Programming Boards category; Hello i am making a projet as my school project and i am almost done... but stuck... very stuck... i ...

  1. #1
    Registered User
    Join Date
    Nov 2012
    Posts
    1

    Post counting occurences

    Hello i am making a projet as my school project and i am almost done...
    but stuck... very stuck...

    i have a array in which i have specific numbers from my text file.

    for example my aray has 3 7 10 14 30 70 in it... (those numbers are days of vacation from my text file and are definitely at least once there)

    and i need to do this:

    if i have more vacations with same length for example i have 5 vacations with 3 days it should write 3: 5


    i dont even know if i posted it in right section...

    i would be glad for any help cause as of right now i am very stuck...

    some example...

    for
    array[3 7 10 14 30 70]
    pole[3 7 10 10 14 30 30 30 70]

    it should write
    3: 1
    7:1
    10:2
    14:1
    30: 3
    70:1

  2. #2
    TEIAM - problem solved
    Join Date
    Apr 2012
    Location
    Melbourne Australia
    Posts
    1,323
    No worries - What have you done so far?
    Fact - Beethoven wrote his first symphony in C

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Counting words occurences
    By darren78 in forum C++ Programming
    Replies: 3
    Last Post: 06-04-2010, 10:48 AM
  2. counting letter occurences in a string
    By pjr5043 in forum C++ Programming
    Replies: 35
    Last Post: 05-05-2008, 09:18 PM
  3. number of occurences
    By kocika73 in forum C Programming
    Replies: 2
    Last Post: 01-29-2005, 11:44 AM
  4. array occurences
    By kurz7 in forum C Programming
    Replies: 5
    Last Post: 04-09-2003, 08:47 AM
  5. occurences in a string
    By wjday in forum C Programming
    Replies: 7
    Last Post: 01-29-2002, 01:07 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21