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