Home
Search
 
What's New
Index
Books
Links
Q & A
Newsletter
Banners
 
Feedback
Tip Jar
 
C# Helper...
 
XML RSS Feed
Follow VBHelper on Twitter Follow VBHelper on Twitter
 
 
 
MSDN Visual Basic Community
 
 
 
 
 
TitleDisplay solutions to the equilateral triangle puzzle in Visual Basic .NET
DescriptionThis example shows how to display solutions to the equilateral triangle puzzle in Visual Basic .NET.
Keywordsalgorithms, games, graphics, mathematics, example, example program, Windows Forms programming, Visual Basic .NET, VB.NET
CategoriesAlgorithms, Algorithms, Puzzles and Games
 

This example displays the solutions to the puzzle Puzzle: find the equilateral triangles in Visual Basic .NET. This program uses the following code to define the puzzle's 25 solutions.

 
' Define the solutions.
Solutions = New List(Of Integer())()
Solutions.Add(New Integer() {0, 2, 3})
Solutions.Add(New Integer() {0, 3, 1})
Solutions.Add(New Integer() {1, 3, 4})
Solutions.Add(New Integer() {2, 5, 6})
Solutions.Add(New Integer() {2, 6, 3})
Solutions.Add(New Integer() {3, 6, 7})
Solutions.Add(New Integer() {3, 7, 4})
Solutions.Add(New Integer() {4, 7, 8})
Solutions.Add(New Integer() {5, 9, 6})
Solutions.Add(New Integer() {6, 9, 10})
Solutions.Add(New Integer() {6, 10, 7})
Solutions.Add(New Integer() {7, 10, 11})
Solutions.Add(New Integer() {7, 11, 8})

Solutions.Add(New Integer() {0, 5, 7})
Solutions.Add(New Integer() {1, 6, 8})
Solutions.Add(New Integer() {3, 9, 11})
Solutions.Add(New Integer() {10, 2, 4})

Solutions.Add(New Integer() {5, 10, 3})
Solutions.Add(New Integer() {2, 7, 1})
Solutions.Add(New Integer() {6, 11, 4})
Solutions.Add(New Integer() {8, 3, 10})
Solutions.Add(New Integer() {4, 6, 0})
Solutions.Add(New Integer() {7, 9, 2})

Solutions.Add(New Integer() {0, 9, 8})
Solutions.Add(New Integer() {1, 5, 11})
 
You can find these solutions manually by looking at the puzzle's dots, although some of the solutions are fairly non-obvious, or you can write a program to find the solutions for you. The example Find solutions to the equilateral triangle puzzle in Visual Basic .NET program finds the solutions.

Related links:

 
 
 
 
Copyright © 1997-2010 Rocky Mountain Computer Consulting, Inc.   All rights reserved.
  Updated