I'm going to give you some ideas on how to do this, and leave the coding up to you. If you have issues with specific bits of the implementation, feel free to ask.
The first thing you'll have to do here is create a place to store the sub-arrays. Since you don't know how many sub-arrays you'll end up with, something dynamic like a List
would be a good choice, but if you haven't learned about those yet, a big array could do the job too.
How long should the big array be? Well, each sub-array is smaller than 100, right? You could add up all the elements in the input and divide by 100 to get an estimate.
Once you've done that initial setup, you need to figure out how to split up the input array into sub-arrays. You know the rule for sub-arrays is "less than 100," so you have to do some addition.
Look at the input elements one by one. Each one of them has to end up in a sub-array; the only question is when to stop one sub-array and start the next one. So, if adding the next input number would make your sub-array total go over 100, store the current sub-array in the big array, and put that input into a brand-new sub-array.
Of course, adding up a bunch of numbers you've added before is a waste of time. You could keep a separate variable on the side for storing the total of the current sub-array so you don't have to add all the elements on the current sub-array for every input. Remember to re-set that variable to 0 when you create a new sub-array!
Finally, it's possible that you'll run out of space in a sub-array or the big array. If that happens, just create a new one that's twice as big and copy the current values in.