Actually, it doesn’t matter west, east, north, or south, as multiple solutions exist for any programming puzzle.
Continue reading
Category Archives: Exercise
One Word at a Time
A filter is a command line tool that takes input, modifies it, and generates output. This month’s Exercise is to create such a filter, one that takes text input and spews it out one word at a time.
Continue reading
Truncate Well That String
Nothing can be more disconcerting than text lopped off before the end of the li
Continue reading
A Simple Calculator
Of course computers can do math! Of course, programming has some math in it! Yet one reason that programmers are not necessarily geniuses at math is that it’s the computer that does the math, not the programmer. To prove that truth, why not code your very own calculator program?
Continue reading
The Multi-Dimensional Array Grid
Data is is just data. Organize that data and it becomes information. When it comes to organizing data in the C language, the first tool you probably learned was the array.
Continue reading
More Centering Challenges
Centering text is one of those basic things many programmer’s have to deal with. Yet once you write the function, you might forget about something I called bounds checking. After all, who would ever pass a string to a centering function where that string would be wider than the field in which it’s centered?
Continue reading
Center Yourself
It’s not the first thing you think of when you design output. No, it’s one of those afterthoughts, those numerous, “Hey, I could do this” moments that programmers experience time and again. In this case, the concept is centering a chunk of text.
Continue reading
Numbers With Commas
As a programmer, you’re used to seeing values like 1000 or 1234999. Your users aren’t. They prefer to see values presented as 1,000 or 1,234,999.01. Or, in Europe the format may look like this 1.000 or 1.234.999,01.
Continue reading
Test Your Formatting Knowledge
In late September and early October, I wrote a series of lessons on how the various printf() formatting commands are used. Now it’s time to put your skills to the test.
Continue reading
Allow Me to Squeeze In Here…
When it comes to editing text, the concept of copy and paste is an old one: You select a chunk of text, choose its new location, then paste in the text. The surrounding text jiggles around to make room. Neat and tidy.
Continue reading