01-edu / public

📚 @01-edu's Public Repository
http://public.01-edu.org/
199 stars 425 forks source link

iterativefactorial subject #2533

Closed Richard-AungKhantMin closed 2 months ago

Richard-AungKhantMin commented 2 months ago

iterativefactorial

The question does not say anything about the limit of the input. How would the programmer know what to do?

nprimo commented 2 months ago

Hi @Richard-AungKhantMin, the subject specifies:

...
Errors (non possible values or overflows) will return `0`.
...

This sentence is providing all the information needed to know how the function should behave in all edge cases.

What do you think is missing?

nprimo commented 2 months ago

@Richard-AungKhantMin please open a new issue or feel free to comment here if there is anything else you would like to add to the conversation :)

Richard-AungKhantMin commented 2 months ago

@Richard-AungKhantMin please open a new issue or feel free to comment here if there is anything else you would like to add to the conversation :)

I figured it out why. There's a limit that int type can handle.