Home
Search
 
What's New
Index
Books
Links
Q & A
Newsletter
Banners
 
Feedback
Tip Jar
 
C# Helper...
 
XML RSS Feed
Follow VBHelper on Twitter
 
 
 
MSDN Visual Basic Community
 
 
 
 
 
TitleFind combinations of mathematical symbols that make an equation true
DescriptionThis example shows how to find combinations of mathematical symbols that make an equation true in Visual Basic 6. For the numbers A, B, C, D, E, and F, the program finds the +, -, *, and / symbols necessary to make A ? B ? C ? D ? E = F true.
Keywordscombination, symbol, mathematics, equation
CategoriesMiscellany
 
Thanks to Ziad Suliman.

Given six numbers A, B, C, D, E, and F, find all ways you can place +, -, *, and / symbols between them to make A ? B ? C ? D ? E = F. For example, 23 * 35 + 20 + 10 - 50 = 785.

The program loops through all of the permutations of four selections from the four symbols +, -, *, and /, calculates the result A ? B ? C ? D ? E, and compares it to F to see if the combination works. See the code for the details.

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