<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>Snipplr - binaryadder</title>
<link>http://snipplr.com/users/binaryadder</link>
<description>Recent snippets posted on Snipplr.com</description>
<language>en-us</language>
<pubDate>Wed, 22 May 2013 06:12:23 GMT</pubDate>
<item>
<title>(C) Vector Operations</title>
<link>http://snipplr.com/view/63017/vector-operations/</link>
<description><![CDATA[ <p>Output:

Vector A:
x: 1.000000
y: 2.000000
z: 3.000000

Vector B:
x: 2.000000
y: 3.000000
z: 4.000000

Adding A and B gives the vector:
x: 3.000000
y: 5.000000
z: 7.000000

Dot product of A and B is 20.000000.

Cross product of A and B gives the vector:
x: -1.000000
y: 2.000000
z: -1.000000

Multiplying A by the scalar quantity 5.0 gives the vector:
x: 5.000000
y: 10.000000
z: 15.000000</p> ]]></description>
<pubDate>Fri, 03 Feb 2012 05:55:42 GMT</pubDate>
<guid>http://snipplr.com/view/63017/vector-operations/</guid>
</item>
<item>
<title>(Java) Wordnik Hangman</title>
<link>http://snipplr.com/view/62348/wordnik-hangman/</link>
<description><![CDATA[ <p>Hangman game that uses the Java Wordnik API.</p> ]]></description>
<pubDate>Fri, 06 Jan 2012 13:32:02 GMT</pubDate>
<guid>http://snipplr.com/view/62348/wordnik-hangman/</guid>
</item>
<item>
<title>(Java) Bogosort</title>
<link>http://snipplr.com/view/62346/bogosort/</link>
<description><![CDATA[ <p>My implementation of the best sorting algorithm ever: Bogosort!

Test code:

int[] deck = {64, 25, 12, 22, 11};  
Bogosort.verboseBogosort(deck);  

Output:


64 25 12 22 11  
22 64 25 11 12  
12 11 22 64 25  
12 64 25 22 11  
64 25 12 11 22  
12 25 22 64 11  
12 22 11 64 25  
12 22 64 11 25  
25 12 11 22 64  
64 25 11 12 22  
11 22 12 64 25  
25 12 11 64 22  
12 22 11 64 25   
25 64 22 12 11  
22 12 64 11 25  
22 64 25 11 12  
12 64 25 11 22  
12 64 25 11 22  
64 25 11 22 12  
11 64 22 12 25  
12 25 64 22 11  
11 25 22 12 64  
11 64 22 12 25  
25 22 64 11 12  
64 22 25 12 11  
12 22 64 11 25  
22 64 25 12 11  
12 11 22 25 64  
64 25 12 11 22  
12 64 25 11 22  
22 64 25 11 12  
25 22 64 12 11  
22 25 11 12 64  
22 64 25 11 12  
11 12 22 64 25  
22 12 25 11 64  
25 22 12 11 64  
64 22 12 11 25  
25 12 22 64 11  
11 12 64 25 22  
25 11 64 12 22  
64 22 11 12 25  
12 11 64 25 22  
64 11 25 12 22  
25 12 22 64 11  
11 64 25 22 12  
11 22 64 12 25  
11 22 64 25 12  
11 12 22 64 25  
25 64 12 22 11  
12 11 25 22 64  
12 11 25 22 64  
11 12 64 22 25  
11 12 22 25 64  
11 12 22 25 64</p> ]]></description>
<pubDate>Fri, 06 Jan 2012 13:23:02 GMT</pubDate>
<guid>http://snipplr.com/view/62346/bogosort/</guid>
</item>
<item>
<title>(Java) Sorting Strings in Ascending Order</title>
<link>http://snipplr.com/view/60040/sorting-strings-in-ascending-order/</link>
<description><![CDATA[ <p>Strings are sorted in ascending order.

This was created by me in order to thwart Dr. McCloskey's evil ways of forcing CS majors to manually alphabetize lists of names and months.</p> ]]></description>
<pubDate>Fri, 21 Oct 2011 08:18:11 GMT</pubDate>
<guid>http://snipplr.com/view/60040/sorting-strings-in-ascending-order/</guid>
</item>
<item>
<title>(Java) Problem 8</title>
<link>http://snipplr.com/view/59873/problem-8/</link>
<description><![CDATA[ <p>Project Euler Problem 8:

"Find the greatest product of five consecutive digits in the 1000-digit number.

73167176531330624919225119674426574742355349194934
96983520312774506326239578318016984801869478851843
85861560789112949495459501737958331952853208805511
12540698747158523863050715693290963295227443043557
66896648950445244523161731856403098711121722383113
62229893423380308135336276614282806444486645238749
30358907296290491560440772390713810515859307960866
70172427121883998797908792274921901699720888093776
65727333001053367881220235421809751254540594752243
52584907711670556013604839586446706324415722155397
53697817977846174064955149290862569321978468622482
83972241375657056057490261407972968652414535100474
82166370484403199890008895243450658541227588666881
16427171479924442928230863465674813919123162824586
17866458359124566529476545682848912883142607690042
24219022671055626321111109370544217506941658960408
07198403850962455444362981230987879927244284909188
84580156166097919133875499200524063689912560717606
05886116467109405077541002256983155200055935729725
71636269561882670428252483600823257530420752963450"

Input: That huge number above.

Output: 40824</p> ]]></description>
<pubDate>Mon, 17 Oct 2011 05:19:51 GMT</pubDate>
<guid>http://snipplr.com/view/59873/problem-8/</guid>
</item>
<item>
<title>(Java) Problem 6</title>
<link>http://snipplr.com/view/59810/problem-6/</link>
<description><![CDATA[ <p>Project Euler Question 6:

"The sum of the squares of the first ten natural numbers is,

1^2 + 2^2 + ... + 10^2 = 385
The square of the sum of the first ten natural numbers is,

(1 + 2 + ... + 10)^2 = 55^2 = 3025
Hence the difference between the sum of the squares of the first ten natural numbers and the square of the sum is 3025  - 385 = 2640.

Find the difference between the sum of the squares of the first one hundred natural numbers and the square of the sum."

Input: 1 100

Output: 25164150</p> ]]></description>
<pubDate>Sun, 16 Oct 2011 03:18:43 GMT</pubDate>
<guid>http://snipplr.com/view/59810/problem-6/</guid>
</item>
<item>
<title>(Java) Problem 5</title>
<link>http://snipplr.com/view/59801/problem-5/</link>
<description><![CDATA[ <p>Project Euler Question 5

"2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder.

What is the smallest positive number that is evenly divisible by all of the numbers from 1 to 20?"

Output:

232792560</p> ]]></description>
<pubDate>Sat, 15 Oct 2011 15:07:28 GMT</pubDate>
<guid>http://snipplr.com/view/59801/problem-5/</guid>
</item>
<item>
<title>(Java) Problem 7</title>
<link>http://snipplr.com/view/59793/problem-7/</link>
<description><![CDATA[ <p>Project Euler Question 7:

"By listing the first six prime numbers: 2, 3, 5, 7, 11, and 13, we can see that the 6th prime is 13.

What is the 10 001st prime number?"

Input: 10001

Output: 104743</p> ]]></description>
<pubDate>Sat, 15 Oct 2011 10:49:51 GMT</pubDate>
<guid>http://snipplr.com/view/59793/problem-7/</guid>
</item>
<item>
<title>(Java) Problem 4</title>
<link>http://snipplr.com/view/59792/problem-4/</link>
<description><![CDATA[ <p>Project Euler Question 4:

"A palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 x 99.

Find the largest palindrome made from the product of two 3-digit numbers."

Output:

906609</p> ]]></description>
<pubDate>Sat, 15 Oct 2011 10:27:51 GMT</pubDate>
<guid>http://snipplr.com/view/59792/problem-4/</guid>
</item>
<item>
<title>(Java) Problem 3</title>
<link>http://snipplr.com/view/59791/problem-3/</link>
<description><![CDATA[ <p>Project Euler Question 3:

"The prime factors of 13195 are 5, 7, 13 and 29.

What is the largest prime factor of the number 600851475143?"

Output:

The largest prime factor of the number 600851475143 is 6857</p> ]]></description>
<pubDate>Sat, 15 Oct 2011 09:40:11 GMT</pubDate>
<guid>http://snipplr.com/view/59791/problem-3/</guid>
</item>
</channel>
</rss>