What is a conventional format for presenting algorithms?
There is no such thing as  the "format" for algorithms. A general agreement¹ is to use pseudocode, i.e. code that abstracts from the particulars of specific programming languages, machines and/or libraries.

The most important thing is to be consistent.
If you want to follow a specific style, I recommend you pick up some textbooks on algorithms and/or data structures and follow the style you like best. 

Some kinds of pseudocode have specific package support in LaTeX, e.g. clrscode, algorithms or pseudocode. For help with these go to tex.SE.




As long as you publish about algorithms as scientist. Articles featuring concrete technology frequently use real code, for better or worse.