Showing posts with label program. Show all posts
Showing posts with label program. Show all posts

Wednesday, August 31, 2011

Primes

In mathematics, natural numbers are prime numbers greater than 1, the denominator factor is 1 and the number itself. 2 and 3 is prime. 4 is not prime because 4 can be divided by 2. The first ten prime numbers are 2, 3, 5, 7, 11, 13, 17, 19, 23 and 29.

If a number is greater than one is not prime, then the numbers are called composite numbers. The simplest way to determine the primes smaller than a certain number is to use the sieve of Eratosthenes

Beri peringkat terjemahan

Biggest Prima Numbers
 
Mathematically, there is no "the largest prime number", because the number of primes is infinite. [1] the largest known prime number as of August 2007 is 232582657-1. [2] This number has 9,808,358 digits [1 ] and is a Mersenne prime number is the 44th. M32582657 (thus writing notations Mersenne primes the 44th) was discovered by Curtis Cooper and Steven Boone on September 4, 2006 which are professors from the University of Central Missouri in cooperation with tens of thousands of other members of the GIMPS project.(....)

Pointer

pointer is a variable that contains the memory address as a value, different from ordinary variable that contains the specified value. In other words, the pointer contains the address of the variable that has a certain value. Thus, there are variables that directly points to a specific value and a variable that indirectly (a variable pointer) points to the value.

int * countPtr, count;

pointer operator
address operator (denoted as &) is a unary operator that returns the address of the operator. as an example, assume the following declaration:

int y = 5
int * yPtr;


examples of program code pointer : (....)

Tuesday, August 30, 2011

Fruit Distance Two Points

The distance between point A (x1, y1) and point B (x2, y2)
AB = Ö ((x1-x2) ² + (y1-y2) ²)
Coordinates Midpoint
Coordinates of the midpoint between point A (x1, y2) and point B (x2, y2)
XT = (x1 + x2) / 2
YT = (y1 + y2) / 2
Distance point to line
Distance of point A (x1, y1) to the line
g: ax + by + c = 0
d = | (ax1 + by1 + c) / Ö (a ² + b ²) |

Note:

To determine the distance between two parallel lines, first specify any point that lies on one line, then declare this point distances to the other line.

Or use the formula to be:

The distance of two parallel lines ax + by + c1 = 0 and ax + by + c2 = 0 is

d = | (c1-c2) / Ö (a ² + b ²) |

usage: (....)

Template by : wanto arwan-programing.blogspot.com