Yesterday, I posted one answer from Samsung Galaxy S4, but when I opened this answer in a web browser, I saw that the posted code was not formatted.
So, is there anything (options) I have to set from the mobile-side to format this code?
You'd mark code just like you would when using the desktop version of the site: by indenting the code blocks 4 spaces.
On the desktop version you can use the code button in the editor, but all that that button does is add those 4 spaces for you. In the mobile web version, you just add spaces manually.
Your answer from yesterday was missing those 4 spaces; you added them later on when you edited the post.
You could use the Stack Exchange Android app to post from your mobile device; it includes a post editor with a formatting toolbar. There is an app for iOS devices too (iPad version is in beta)!
Chrome Browser
.