Author

Topic: Basic Console Applications (Read 1988 times)

copper member
Activity: 105
Merit: 4
May 27, 2011, 01:54:02 PM
#4
No problem. Always a pleasure to see new programmers willing to learn.
newbie
Activity: 30
Merit: 0
May 27, 2011, 09:36:49 AM
#3
Thanks a lot! I will start working right now.  Thanks for the opportunity, I really appreciate it!
copper member
Activity: 105
Merit: 4
May 27, 2011, 01:27:02 AM
#2
Im feeling generous, so I'll bite if you are still doing this. Below are four programming problems that each introduce a crucial programming concept (Recursion, file I/O, binary numbers, string manipulation, and sorting). I tried to put them in the order of what I consider to be easiest to hardest, but you may disagree with the order (You dont have to do them in order or even do all of them) For every problem, put the source code and a compiled executable (the .exe file) up for download and send me a link. I will give you .15 BTC for each problem where I am satisfied with your solution. If you get a perfect solution for all 4 problems, Ill give you an extra .15 BTC for a total of .75 BTC.

1. Ask the user for an input positive integer x. Without using loops or goto statements (look up recursion), print "RECURSION!" x times.

Sample run:

Input: 4
RECURSION!
RECURSION!
RECURSION!
RECURSION!



2. Ask the user to input "D" or "B". If the input is "D", ask the user to input a positive integer in in base-10 (Decimal) and output it as a binary. If the input is "B", ask the user to input a positive integer in base-2 (Binary) and output it as a decimal. Assume all inputs are valid (don't error check)

For example consider the number Four. Four is 4 in base-10 (Decimal) and 100 in base-2 (Binary)

Sample run #1:

Type: D
Input: 4
Output: 100

Sample run #2:

Type: B
Input: 100
Output: 4



3. Ask the user to input "C" or "D", then, a filename/path to read for input, and a filename/path for output. If the user put "C" (for "Compress"), compress the file using Run-Length compression. If the user put "D", decompress the file using Run-Length compression. In both cases, output the result to the filename/path the user provided for output.

Run-Length compression is easy to understand. Consider a textfile that just has "AAABB". That will compress to something like 3A2B. Essentially, "3A2B" says 3 A's and 2 B's, or "AAABB". More examples:

Uncompressed -> Compressed
AAAAA -> 5A
ABCDE -> 1A1B1C1D1E
AABBA -> 2A2B1A



4. Ask the user for an input (Assume the input is always an integer. No need to error check the input). Continue asking for input until the user types "end" (case insensitive). Assume all inputs are valid (integer or "end" (case insensitive)). After the user types "end", sort the integers and output the result. No using library functions for sorting! :]

Sample run:

Input: 7
Input: 14
Input: 2
Input: eND
Result: 2, 7, 14



You can use C++ or C#, I don't care. Good luck!
newbie
Activity: 30
Merit: 0
May 20, 2011, 11:18:00 PM
#1
Hi,

I have been learning about C++ and C# developing, but I have been lacking motivation.  Since I am a greedy person, I am offering to do some basic console applications (calculators, maybe some very simple games or other simple things).  I plan to be learning as I code,  so I am always ready for new challenges.  I understand that a lot of people here are developers and certainly know much more than me, but with me, you'll be encouraging a young guy to have a great future.

If you are interested in these kind of applications, please send me a PM with what you want and how much you'd be ready to pay for it, although I certainly don't expect much (along the lines of 0.10-0.25BTC).  I will also apologize for any non-sense in this message, I am French Canadian, so English is my second language.  Which actually brings an idea to my mind, I am willing to translate documents from English to French or from French to English.

Thanks!
Jump to: