Iterative dp code for

bro in this question please give me an iterative dp solution i solved it using recursive approach but not able no do
NOTE please suppose x<100 (since you won’t have to think more to reduce it )
i just need logic to store bro in boolian i mean i m new in dp so please help