How to write formulae of simple compounds?

How to write formulae of simple compounds?
and how to write the valency while writing the symbols of some common, simple and polyatomic ions?

Writing Chemical Formulae
Step 1 : Write the symbol of a basic radical (element with the positive valency) to the left hand side and that of the acid radical (element with the negative valency) to the right hand side.
Step 2 : Write the valency number/charge of each of the respective ions at the bottom of its symbol.
Step 3 : Interchange the valency number. Ignore the (+) and (-) sign.
Step 4 : Write the interchanged number.
Step 5 : Write the compound’s formula.
Step 6: Cross the reduced valencies. If 1 appears, ignore it. And if a group of atoms receive a valency number more than 1, enclose it within the brackets.