Difficulty: ★ ☆ ☆ ☆
If you’ve studied the terminal window at any length, you probably know about the clear command, which clears the screen. Under MS-DOS, and on my old TRS-80, the command is cls. Same thing.
Continue reading
If you’ve studied the terminal window at any length, you probably know about the clear command, which clears the screen. Under MS-DOS, and on my old TRS-80, the command is cls. Same thing.
Continue reading
Adding values is a basic programming concept: 4 + 5 = 9 But where do the values come from? They can be literals, variables, expressions, or values collected from the user.
Continue reading
Even when statistics has barely brushed by you on the subway, you probably know the term standard deviation. It refers to how data is distributed in a group, their distance from the mean. You can use your C programming kung fu to code the standard deviation of a data set, which is the challenge for this month’s Exercise.
Continue reading
I started my technology writing career at a computer book publishing house, CompuSoft. It’s no longer around, but I do recall ghost writing books such as the BASIC Handbook, which was an encyclopedia of the BASIC programming language. The first command listed in this book was ABS
.
Continue reading
Calculating a factorial is a common programming exercise, often coupled with introducing the concept of recursion. Mathematically, the factorial has a twin: the subfactorial. Its calculation can be a fun programming challenge, which is the subject of this month’s Exercise.
Continue reading
One of my pastimes is watching math videos. I was a terrible math student, but I enjoy the videos. Occasionally a concept is presented that I can program in C. This month’s Exercise covers one of these concepts.
Continue reading
Swapping values is common task in computer programming, often used when sorting. You need the value of variable a
in variable b
and vice-versa. A number of methods are available for swapping, most of which involve using a temporary variable to hold one of the values during the swap.
Continue reading
Tetration is a mathematical process that generates obnoxiously huge numbers quickly. It’s exponentiation on overdrive. The concept is insane, but it’s also something you can code in C.
Continue reading
I’m sure some eccentric term exists to describe a number where no digits repeat. Whether this concept has any mathematical relevance remains uncertain. But it’s the type of problem you can easily solve by writing a computer program.
Continue reading
Probability. Odds. These are words I often confuse, but the similarity relates to how often things happen. The gold standard is the flip of a coin: two possibilities, heads or tails. If you don’t understand how it works, you can write code to drive home the point.
Continue reading
Copyright © 1997-2024 by QPBC.
All rights reserved