C Board  

Go Back   C Board > Community Boards > Contests Board

Reply
 
LinkBack Thread Tools Display Modes
Old 06-21-2005, 11:48 PM   #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.
ILoveVectors is offline   Reply With Quote
Old 06-23-2005, 06:28 AM   #2
VA National Guard
 
The Brain's Avatar
 
Join Date: May 2004
Location: Manassas, VA USA
Posts: 902
mines in for #1
__________________
  • "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

Last edited by The Brain; 06-23-2005 at 06:49 AM.
The Brain is offline   Reply With Quote
Old 06-23-2005, 08:37 AM   #3
Banned
 
Join Date: Jun 2005
Posts: 594
great, im glad to see someone is in.
ILoveVectors is offline   Reply With Quote
Old 06-23-2005, 10:45 AM   #4
x4000
 
Ruski's Avatar
 
Join Date: Jun 2002
Location: Outer Space!
Posts: 542
hehe.. is that homework
__________________
what does signature stand for?
Ruski is offline   Reply With Quote
Old 06-23-2005, 10:48 AM   #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.
ILoveVectors is offline   Reply With Quote
Old 06-23-2005, 10:58 AM   #6
VA National Guard
 
The Brain's Avatar
 
Join Date: May 2004
Location: Manassas, VA USA
Posts: 902
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.

__________________
  • "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

Last edited by The Brain; 06-23-2005 at 11:02 AM.
The Brain is offline   Reply With Quote
Old 06-23-2005, 11:06 AM   #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?
Ruski is offline   Reply With Quote
Old 06-23-2005, 11:07 AM   #8
VA National Guard
 
The Brain's Avatar
 
Join Date: May 2004
Location: Manassas, VA USA
Posts: 902
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
The Brain is offline   Reply With Quote
Old 06-23-2005, 11:53 AM   #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.
ILoveVectors is offline   Reply With Quote
Old 06-23-2005, 12:05 PM   #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.
ILoveVectors is offline   Reply With Quote
Old 06-23-2005, 12:29 PM   #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.
ILoveVectors is offline   Reply With Quote
Old 06-23-2005, 02:16 PM   #12
VOX
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!!!!
VOX is offline   Reply With Quote
Old 06-23-2005, 03:03 PM   #13
VA National Guard
 
The Brain's Avatar
 
Join Date: May 2004
Location: Manassas, VA USA
Posts: 902
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
The Brain is offline   Reply With Quote
Old 06-23-2005, 04:01 PM   #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.
ILoveVectors is offline   Reply With Quote
Old 06-23-2005, 05:01 PM   #15
Carnivore ('-'v)
 
Hunter2's Avatar
 
Join Date: May 2002
Posts: 2,865
>>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.
Hunter2 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Forum Jump

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


All times are GMT -6. The time now is 10:35 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.0 RC2

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