How to understand logic in program?
I can't understand logic of simple program
Just practice and everything will be OK 😃
To develop logical skill you require understanding and implementation. This basically means studying and more practice.
I think first try to do your own programs and gradually you'll learn some patterns that help you understand code of others