Top Topics in our Forum';
Interactive Parabola Grapher
Explore graph ,equation and the locus of a Parabola
Save graphs to your desktop!

A+    A−    B  
Algebra
Games
Geometry
Interactive
Trigonometry
Forum



Warning: include(/home/mathwa6/public_html/php_include/forum_left_side.php) [function.include]: failed to open stream: No such file or directory in /home/mathwa6/public_html/php_include/ontheLeft_moris.php on line 296

Warning: include() [function.include]: Failed opening '/home/mathwa6/public_html/php_include/forum_left_side.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/mathwa6/public_html/php_include/ontheLeft_moris.php on line 296


AddThis Social Bookmark Button

Hex Numbers Project

Related Project: Problem 162 from Project Euler

Problem 162

This problem is inspired by a problem from Project Euler and is reproduced s for my Advanced Placement Computer Science students. To receive credit for this assignment, students must corectly answer the problem as well as email me the Java Code that solved the problem. The actual problem

In the hexadecimal number system numbers are represented using 16 different digits:

0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F

The hexadecimal number AF when written in the decimal number system equals 10x16+15=175.

In the 3-digit hexadecimal numbers 10A, 1A0, A10, and A01 the digits 0,1 and A are all present.
Like numbers written in base ten we write hexadecimal numbers without leading zeroes.

Problem to solve

How many hexadecimal numbers containing 3, 4 or 5 digits exist with all of the digits 0,1, and A present at least once? For this assignment you must store each of the numbers in an ArrayList. Your program should print out the final list of numbers. You can use the .size() of the ArrayList to figure out how many hex numbers satisfy this condition.