I went bowling the other day. Actually, I went to watch people bowl. I’m a terrible bowler, having never rolled anything higher than 148 in my life. Breaking 100 is a rare occasion. But one thing I can do well is understand how the scoring works.
Continue reading
Category Archives: Exercise
Board of Chess
Thanks to Mr. Spock (and God bless you, Mr. Nimoy!), many people think of Chess when they think of computer programming. Unlike mankind’s favorite Vulcan, coding your own computer chess game would be a tremendous undertaking. Even so, you can start with the basics and write a program that outputs a chessboard.
Continue reading
Pattern Manipulation
You see them all the time, mostly as “busy” gizmos. They are animations that spin or dance to deceive you into believing that the software is really doing something. But they’re merely animations. In fact, they’re very simple animations that require practically effortless coding.
Continue reading
Round Numbers
The C library holds functions that help you round-off floating point values. I can name a few, but then it would make this month’s rounding exercise too easy. So I won’t!
Continue reading
Just Average
Among the tools missing from the C library, which are ample in other programming languages, are functions that manipulate arrays. I’ve seen functions in other programming languages that slice, dice, mince, and chop an array. One of the more common functions calculates the average of a numeric array.
Continue reading
Making Change
This month’s challenge is to calculate the number of quarters, dimes, nickels, and pennies required when given a specific dollar amount. It’s something fast food cashiers should know, but apparently they don’t! So maybe your solution to this exercise could help them.
Continue reading
From Text to Integer
A program prompts for a value. The user types “12345” at the keyboard, but that input is a string and not the value 12,345. Therefore, the code must convert the string into a value. This task can be accomplished in a number of ways.
Continue reading
The Inverse Pyramid
Two things that seem to be difficult for a beginning C programmer are numbers and their formatted presentation. I admit: These things are difficult to understand. Therefore some practice is in order.
Continue reading
Hone Your Disk Drive C
Often times the problems you’ll encounter in C involve interface with something else. You’ll need to code directions for an operating system or interact with data that already exists or is output from some function. In this month’s exercise, you get to test-run those skills.
Continue reading
Show Me a Bar Chart
Computers are notorious for spewing out rows and columns of meaningless numbers. Sure, they have significance, but often your audience is more energized when they view something other than a dull table filled with values.
Continue reading