Thread: Beginners Contest, Others our Welcome

  1. #1
    Banned
    Join Date
    Jun 2005
    Posts
    594

    Beginners Contest, Others our Welcome

    I would like to start a contest for some of the new c++
    programmers that have joined the board recently.

    If your interested you can choose one or choose to do
    all of the possible choice and PM them to me. The due date
    for all entries is June 28 Midnight.

    Choice to program and remember these are for beginniers.

    1. Write a program using the fewest lines of code while
    still indenting and using comments while accomplishing the
    following : Read lines from a plain text file using any
    vowel (a, e, i, o, u, y) as a delimiter then store the string in a
    vector. output the strings to a new file with a new line between
    each string.

    Ex : This is a test!

    would be put out to a new file like this

    Th
    is
    is
    a
    t
    est!

    I cant think of a real practical use for this other then to just help
    you think and test your abilities. Ask for the name of the file
    to open and the name of the file to save the strings to. Extra
    credit for using commandline parameters.

    2. Write a program using the fewest lines of code while
    still indenting and using comments while accomplishing the
    following : Read a plain text file in and change it letter by letter
    into the equivlent number place of the american alphabet.


    Ex:

    Az

    would be put out to a file like this

    1 26

    Remember to put spaces between every character in the output
    file, if the character is not one of the 26 simply put that character
    into the output file with no changes. As before commandline to
    recieve file names is extra credit. Also extra credit can be recieved
    for keeping track of how many letter you changed.

    3. Write a program using the fewest lines of code while
    still indenting and using comments while accomplishing the
    following : Using a struct to save information create a program
    that can keep track of purchases you enter and keep a running
    balance. For extra credit output the content of the struct to a file
    in a nice format, that format is up to you.



    For those wondering points will be averaged between the
    number of contest you complete. For every contest you complete
    starting a 2 you will recieve 10 points. So if you complete all 3
    contests you will have 20 points before yours are graded. Once
    they are graded they will be added up, your extra points added
    then averaged. Highest Score wins. Those that comment the
    best and indent well will help speed along grading thus improve your score.

    Good Luck to those who participate.


    The winner and the best code snipplets will be posted here,
    if there are alot i will place them in a new post for voting on
    by other members of cprogramming.com
    Last edited by ILoveVectors; 06-21-2005 at 11:52 PM.

  2. #2
    VA National Guard The Brain's Avatar
    Join Date
    May 2004
    Location
    Manassas, VA USA
    Posts
    903
    mines in for #1
    Last edited by The Brain; 06-23-2005 at 06:49 AM.
    • "Problem Solving C++, The Object of Programming" -Walter Savitch
    • "Data Structures and Other Objects using C++" -Walter Savitch
    • "Assembly Language for Intel-Based Computers" -Kip Irvine
    • "Programming Windows, 5th edition" -Charles Petzold
    • "Visual C++ MFC Programming by Example" -John E. Swanke
    • "Network Programming Windows" -Jones/Ohlund
    • "Sams Teach Yourself Game Programming in 24 Hours" -Michael Morrison
    • "Mathmatics for 3D Game Programming & Computer Graphics" -Eric Lengyel

  3. #3
    Banned
    Join Date
    Jun 2005
    Posts
    594
    great, im glad to see someone is in.

  4. #4
    x4000 Ruski's Avatar
    Join Date
    Jun 2002
    Location
    Outer Space!
    Posts
    542
    hehe.. is that homework
    what does signature stand for?

  5. #5
    Banned
    Join Date
    Jun 2005
    Posts
    594
    im not in school, its more like homework for you.
    besides i already wrote the program to have something
    to compare the entries to.

  6. #6
    VA National Guard The Brain's Avatar
    Join Date
    May 2004
    Location
    Manassas, VA USA
    Posts
    903
    im
    n
    ot
    in
    sch
    ool,
    its
    m
    or
    e
    l
    ik
    e
    h
    om
    ew
    ork
    f
    or
    y
    ou.
    b
    es
    id
    es
    i
    alr
    ead
    y
    wr
    ot
    e
    th
    e
    pr
    ogr
    am
    t
    o
    h
    av
    e
    s
    om
    eth
    ing
    t
    o
    c
    omp
    ar
    e
    th
    e
    entr
    ies
    t
    o.

    Last edited by The Brain; 06-23-2005 at 11:02 AM.
    • "Problem Solving C++, The Object of Programming" -Walter Savitch
    • "Data Structures and Other Objects using C++" -Walter Savitch
    • "Assembly Language for Intel-Based Computers" -Kip Irvine
    • "Programming Windows, 5th edition" -Charles Petzold
    • "Visual C++ MFC Programming by Example" -John E. Swanke
    • "Network Programming Windows" -Jones/Ohlund
    • "Sams Teach Yourself Game Programming in 24 Hours" -Michael Morrison
    • "Mathmatics for 3D Game Programming & Computer Graphics" -Eric Lengyel

  7. #7
    x4000 Ruski's Avatar
    Join Date
    Jun 2002
    Location
    Outer Space!
    Posts
    542
    ok so what if I win the contest? do I get lots of cash?
    what does signature stand for?

  8. #8
    VA National Guard The Brain's Avatar
    Join Date
    May 2004
    Location
    Manassas, VA USA
    Posts
    903
    something more important than cash..







    braggin' rights.
    • "Problem Solving C++, The Object of Programming" -Walter Savitch
    • "Data Structures and Other Objects using C++" -Walter Savitch
    • "Assembly Language for Intel-Based Computers" -Kip Irvine
    • "Programming Windows, 5th edition" -Charles Petzold
    • "Visual C++ MFC Programming by Example" -John E. Swanke
    • "Network Programming Windows" -Jones/Ohlund
    • "Sams Teach Yourself Game Programming in 24 Hours" -Michael Morrison
    • "Mathmatics for 3D Game Programming & Computer Graphics" -Eric Lengyel

  9. #9
    Banned
    Join Date
    Jun 2005
    Posts
    594
    The contest is just for those who are interested, or
    for people who like to take on challanges.

    Thing you gain out of the contest?

    like he said braggin rights, but mostly a sense of accomplishment
    and hopefully something is learned by the completion of it.

  10. #10
    Banned
    Join Date
    Jun 2005
    Posts
    594
    I just noticed that i had made a typo when typing out the example
    for exercise number 1 :

    Th
    is
    is
    a
    t
    est!


    should have actually been


    Th
    is
    is
    a t
    est!

    Everyline after the first one should start with a vowel :/

    For those that have submitted there code already you can
    choose to resubmit the code with the changes or you can
    keep the code you have now and i will not deduct any point
    for it. Sorry about that i didn't realize it until i was testing
    some of the code already submitted.
    Last edited by ILoveVectors; 06-23-2005 at 12:29 PM.

  11. #11
    Banned
    Join Date
    Jun 2005
    Posts
    594
    Oh and btw i am offering a extra 5 points to anyone who complete
    contest 3, everyone seem to be sticking with the 1 and 2
    contest where in my opinion contest #3 is the harder,
    so this is to help stimulate a urge to try contest #3.

  12. #12
    Deleting... VOX's Avatar
    Join Date
    Oct 2004
    Location
    VA
    Posts
    94
    I dunno about you but #3 looks the easiest to me. I think I might try that one, but don't count on me.
    Boy you stink, go take a shower before you continue to code. Better do your laundry and spray your chair too.

    The one and only resource for finding information.

    Next version of windows released!!!!

  13. #13
    VA National Guard The Brain's Avatar
    Join Date
    May 2004
    Location
    Manassas, VA USA
    Posts
    903
    this does not make sense to me:
    Code:
    Th
    is
    is
    a t
    est!

    the orignal example makes sense, so I am sticking with my orignial code.
    • "Problem Solving C++, The Object of Programming" -Walter Savitch
    • "Data Structures and Other Objects using C++" -Walter Savitch
    • "Assembly Language for Intel-Based Computers" -Kip Irvine
    • "Programming Windows, 5th edition" -Charles Petzold
    • "Visual C++ MFC Programming by Example" -John E. Swanke
    • "Network Programming Windows" -Jones/Ohlund
    • "Sams Teach Yourself Game Programming in 24 Hours" -Michael Morrison
    • "Mathmatics for 3D Game Programming & Computer Graphics" -Eric Lengyel

  14. #14
    Banned
    Join Date
    Jun 2005
    Posts
    594
    That fine brain no big deal, but im jsut saying
    it should come out so that it prints till it find the first vowel
    then it prints the vowel on the next line and continue printing until the next vowel then it should print the vowel on the next line and continue printing, this just to clear it up for others.

  15. #15
    Carnivore ('-'v) Hunter2's Avatar
    Join Date
    May 2002
    Posts
    2,879
    >>Using a struct to save information
    What information do you want saved? Do you mean a single struct containing everything, or is it each struct represents a purchase, or the struct represents the person's finances and purchase history, or what?

    >>keep track of purchases you enter
    What is a 'purchase'? What information goes with it? How do you enter a purchase?

    >>and keep a running balance.
    What does the balance start at? Is it stored together with your 'struct'?

    And I have some fun entries for #1 and #2.
    Just Google It. √

    (\ /)
    ( . .)
    c(")(") This is bunny. Copy and paste bunny into your signature to help him gain world domination.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Beginners Contest #2 For those who wanted more!!
    By ILoveVectors in forum Contests Board
    Replies: 16
    Last Post: 08-12-2005, 12:03 AM
  2. Expression Evaluator Contest
    By Stack Overflow in forum Contests Board
    Replies: 20
    Last Post: 03-29-2005, 10:34 AM
  3. WANTED: Contest Master
    By kermi3 in forum A Brief History of Cprogramming.com
    Replies: 15
    Last Post: 01-23-2003, 10:15 PM