function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Ambuj Agrawal 19Ambuj Agrawal 19 

How to divide number into n parts?

Example want to break 10 into 3 parts so there are multiple combinations
like 2+2+6, 1+2+7, 1+6+3... etc.
Help me is there any way to achieve this in salesforce using apex ?
Pankaj Yadav 16Pankaj Yadav 16
What is your actual requirement for apex class.
Ambuj Agrawal 19Ambuj Agrawal 19
I have a vf page in which there is a quantity field and have to break n times with different-2 combination whenever page load.