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 6
DescriptionThis example shows how to display solutions to the equilateral triangle puzzle in Visual Basic 6.
Keywordsalgorithms, games, graphics, mathematics, example, example program, Windows Forms programming, Visual Basic 6, VB 6
CategoriesAlgorithms, Algorithms, Puzzles and Games
 

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

 
' Define the solutions.
AddSolution 1, 3, 4
AddSolution 1, 4, 2
AddSolution 2, 4, 5
AddSolution 3, 6, 7
AddSolution 3, 7, 4
AddSolution 4, 7, 8
AddSolution 4, 8, 5
AddSolution 5, 8, 9
AddSolution 6, 10, 7
AddSolution 7, 10, 11
AddSolution 7, 11, 8
AddSolution 8, 11, 12
AddSolution 8, 12, 9

AddSolution 1, 6, 8
AddSolution 2, 7, 9
AddSolution 4, 10, 12
AddSolution 11, 3, 5

AddSolution 6, 11, 4
AddSolution 3, 8, 2
AddSolution 7, 12, 5
AddSolution 9, 4, 11
AddSolution 5, 7, 1
AddSolution 8, 10, 3

AddSolution 1, 10, 9
AddSolution 2, 6, 12
 
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 6 program finds the solutions.

Related links:

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