Both of these problems are approached in the same way. First, you need to find the slope of the line, which is the difference in the y-coordinates divided by the difference in the x-coordinates. Make sure you use the same point as the first point when subtracting the values, or you will...

Since the ship is receiving the signal from transmitter #1 36.5907 microseconds after transmitter #2, you know that the ship is further from transmitter #1. Since the signal is traveling at 0.3 km/microsecond, you can calculate that the ship is 36.5907 * 0.3 km further from transmitter...

The place to start is where the power (x in this case) is 0. Any non-zero number raised to the power of 0 is 1, which is then multiplied by 2 in this function. Therefore, your first point is (0,2).
For each value of x greater than zero, you'll be multiplying the result...

Infinity is a term with which most people are familiar, but few truly understand. Infinity is not an actual value, like the number 3 -- it is an abstract concept. In math terms, it is used as a "limit", where a value can approach infinity by getting continuously larger, but it will never actually get there. Consider the act of cutting a pizza into slices. You can cut it in half, then...
read more

When using C++ for object-oriented programming, there are some basic concepts and best practices that should be followed for good software engineering. First is the use of public and private in class definitions. Most programmers moving from C to C++ are accustomed to using structs, where all fields are "public" for others to access; in C++, all fields in a class...
read more

A struct is a datatype from the C programming language that encapsulates a number of different datatypes into a single object. This can be used to easily handle a set of values as a single "package", while also being able to access the individual members of the structure. One example of this may be a ContactInfo structure that contains a person's first name, last name, e-mail address,...
read more

Here's an interesting math fact: the sum of any sequence of odd numbers from 1 to n is always a perfect square.
1 = 1
1+3 = 4
1+3+5 = 9
1+3+5+7 = 16
1+3+5+7+9 = 25
1+3+5+7+9+11 = 36
etc.
The sum is actually the square of (n+1)/2.
---------
What this also means is that every odd number can be...
read more

Think of a number. Any number at all... between 10 and one billion.
Now, since that number has at least two digits, add up all of the digits, and subtract that sum from your original number.
Next, add up all of the digits of the number you just got after that subtraction, to get another new number. And then do it again with THAT number (if you have only a one-digit number, you would just...
read more

I'm about to share a secret with you that can instantly reduce the amount of time spent on math tests and homework where you need to find the greatest common factor (GCF) of two whole numbers, such as when reducing fractions to simplest form. This is a methodology/short-cut that I came up with long ago, but never saw described in any textbook, much to my surprise. The basic idea is actually quite...
read more