In this article I’ll introduce you to C’s arithmetic operators along with some other operators that make programming in C easier. I’ll start with arithmetic. At the end of the article, I’ll write two programs that utilize the Input, Process, Output template to demonstrate what was covered.
C’s arithmetic operators are:
These operators have an order of precedence where modulus, division, and multiplication have a higher precedence than addition and subtraction. You can modify the order of precedence by using parentheses, which have the highest…
There are several reasons you should learn these different programming styles. First, there are…
Before I get too deep into C, I need to show you how to get data into and out of your programs. Using assignment for data gets old after a while and you want to be able to have users enter their own data. And you definitely need to be able to see what happens to your data in a program so learning how to display data to the screen is important and necessary.
Besides demonstrating how to perform input and output in C, I will also be demonstrating two templates that are related to those topics — Prompt, Then…
In a recent article, I discussed how I’ve decided to move my ultrarunning off of trails and onto roads and the track with road ultramarathons and timed track or road races. Since that article, I’ve searched for my first race following this new philosophy and I just signed up for it — the Rez Loop Challenge in Brandon, Mississippi.
This race follows an 11-mile loop around a lake that consists of a paved bike trail, a little road running, and some running on a concrete sidewalk. Another interesting facet of this race is that it is held on June 5…
Computer scientists use Big O notation to determine efficient algorithms. In this article I’m more interested in how computer programming languages perform on a simple sorting algorithm. I will do this comparison by using the system clock to measure the amount of time (in milliseconds) it takes to use selection sort to sort one million randomly generated numbers stored in an array.
Here are the specs for my Dell laptop, which is the computer I used in this performance test:
The C language has been around since the late 1960s. Ken Thompson and Dennis Ritchie of Bell Labs developed the language while also developing the Unix operating system. In fact, the two really go together as a lot of the motivating factors for the features of C were based on how well the language would work for developing a fast and efficient operating system.
Surprisingly, the C language is still quite popular. It is perennially at the top of the TIOBE Index of popular computer programming languages. …
Everyone can do something to improve their running. Galen Rupp can improve; Molly Seidel can improve; and you can improve also. Here are 6 suggestions of things you can do right now to make yourself a better runner.
Every runner can improve their running just by running more. The more you run the better you will become.
You don’t have to look any further than the long distance running success of the East Africans to see why volume is so important. …
Knuth named this algorithm the TPK (Trabb Pardo Knuth) algorithm. Here is the pseudocode for the algorithm:
Get 11 numbers from the user
For each item in the sequence starting with the last element:
Call function F with the item as an argument
Display the function return value
Function F is defined like this:
How do you feel about your running? Does your running make you happy? Or does it leave you frustrated? Or are you just going through the motions (no pun intended) with your running and not even thinking about how you feel about it?
There are four possibilities to consider about when you think about your running, so that it can be a more fulfilling part of your life.
Why do you run? To get and stay healthy? To lose some weight? To compete against other runners? We all have a why for our running but we don’t always know what…
One week ago (February 6, 2021) I ran a 75 minute (1:15:04) 15K at the River Trail 15K, which is run in Burns Park in North Little Rock, Arkansas. This time earned me second in the Men’s Senior division. In this article, I’ll discuss the training I did leading up to the race including how I handled my taper on race week, which often causes runners lots of consternation (the taper tantrums).
First, for those of you who haven’t read any of my other writing, I am a 63 year old man. I work as a computer science instructor at…