Actually same code

Hey guys i am new here. I just tried to code begginer level and i saw intresting thing about IDE. I wrote 2 algorithm for Sum of Digits problem which is at begginner category and these codes are litteraly same except 4th line. I just switch place n and t variables. one is working fine but other not working. It takes couple hours :smiley:

Thank you!!!

You havenโ€™t provided any input. So maybe, for the first program, t gets assigned 0 and the program finishes, not expecting any other input. And maybe, for the second, it waits indefinitely for an input that will never come :frowning:

Did you provide custom inputs?

:thinking: Interesting. Can you share the language and version you are using.

Thank you.