1 - 4 of 4 Posts

#### Casterina

· Registered
Joined
·
248 Posts
Discussion Starter · ·
I'm working on a small project which I want to create a mathematics program to help me out, it's based on mathematics, I was thinking if I can create it using Microsoft Visual Studio

This is how I want it to work,

It must have 10 input boxes for me to input the numbers, each box contains two numbers, input numbers will be from 1 to 37

After I have input the numbers into the 10 input boxes, it will generate a 10x10 grid of numbers by using this mathematics calculation method,

For example, if I have input 12 and 27 into the first input box, it will calculate it as 27-12 = 15, if the answer is positive then always leave it as it is

If the answer is negative for example, if I input 36 and 19, it will calculate it as 19-36 = -17, the answer is negative so it will need to add 37 to the answer which will be -17+37 = 20, so 20 will be the final answer

For example in the screenshot, 21-15 = 6, the answer 6 will be placed in S1 column and 19 - 6 = 13, the answer 13 will be placed in S2 column, it's always the bottom number minus the top number

In the screenshot, I only showed 5 boxes of input numbers and 5 columns so it doesn't confuse you, but once it's finished, it will have 10 input boxes and 10 columns

#### CTRLurself

Joined
·
3,093 Posts
Can I ask what practical purpose this would serve?

Next, it would probably be easiest to program this iteratively by column arrays.

1) Take the inputs put them into a 1-dimensional array, calculate the second column of numbers and put them into a new array.
2) Check that all the numbers are positive, do whatever you want to them if they aren't using a loop that checks each value in the array.
3) Calculate the next column of numbers into a new array.
4) Check the values, correct them as needed.
5) Keep repeating until you end up with a single value.

#### wedge

· Registered
Joined
·
963 Posts
It would be trivial to write a program to do this. But it's even more trivial to just do this in Excel:

1 - 4 of 4 Posts