hello i am a teacher in a primary school who try to program in vb as hobbyist. (i com here by googling )

I am interested in a code in vbnet or C# able to find all the partition in 2 or 4 terms of any numbers n. Is you java code able to do that ? If yes, Do you know how to translate it in C# or VB please?

thank you

pascal

I would like to build a software for my young pupils : here is the goal

Tables of numbers:

In a table of numbers, pupils have to find the pairs (vertical or horizontal numbers side by side) whose sum is 10 (for example). or a variant that is finding squares with the numbers (quadruplets?) gives 100 (for example in yellow in the grid).

Objectives: To bring the children to make many calculations to track down peers or square in question.

I want to automate the creation of job as upper. However, mathematically speaking, I wonder if there is an "equation" that would find all the pairs or quadruplets of a number?

The user variables to integrate are:

the size of the grid: LgGrille and HtGrille as integer

the target number: NbCible as integer (or decimal?)

The type of work (pairs / quadruplets) JobType

The amount of peers / quadruplets hidden in the grid: QteJob

The allowed or prohibited overlay solutions possible (as boolean?)

The table of possible pairs or quadruplets calculated and stored as array? ArrayPatterns

Pseudo code:

1. Find all the possible patterns and store them in an array? Calculate the number of possible Patterns: Nbpatterns

2. Show this number in the user interface to choose an intelligent QteJob (If QteJob> Nbpatterns, then it will use several times the same ArrayPatterns.item)

3. Place the QteJob ArrayPatterns.items randomly on the grid within the non-overlapping, if it is prohibited

4. Finish filling the grid with numbers being careful not to accidentally create new ArrayPatterns.item

5. Using the same way to print the job as Maze and magic square