jeudi 26 novembre 2020

Generate terms which add up to x

I am trying to take y number of terms and make them added together to equal a predefined x.

I can't seem to think of an answer to this, and havent exactly tried anything other than for loops to generate some numbers.

If anyone could show some examples or try to explain, that would be very much appreciated.

EDIT: Examples of terms: "3g", "-5o", "4"




Aucun commentaire:

Enregistrer un commentaire