My Data Structure teacher asked me to do a list of exercises, and one of the questions consists of writing a program to solve the numbers decomposition problem, for example:

I need to use the list data structure to do that, anyway my problem isn't with the data structure, my problem is with the algorithm. Does anyone know a simple way to do this?

There is a pattern. The first column is initially the entered number (5), subtracted by 1. Hence you have 4 in the first column. The difference between the first number and the initial number is 1, since 5 - 4 = 1. The first number is again decreased by 1, resulting in 3. 5 - 3 = 2. 2 by itself can be expressed by 1 + 1, that'S why the 3rd row has 3 + 1 + 1. I think you can take it from there.

I have a 2d matrix with dimension (3, n) called A, I want to calculate the normalization and cross product of two arrays (b,z) (see the code please) for each column (for the first column, then the second one and so on).
the function that I created to find the ...

I am an aspiring (at the age of 27) programmer using C++. I have future undertakings including getting a refresher course at a premier University in my country.

I am just interested to know in advance how it is to become a programmer. What are the regular routines that you ...

OK, so HostGator for some reason no longer allows gcc/g++ access unless you have a Designated Server account, which is a lot of money to spend just to compile my "Hello World" program. Thus I figured I'd compile at home, then upload. Program is your regular old bare-bones Hello World ...