Create Pattern Diamond

This code will print or output an diamond pattern which the size is according to user's input.

condition in if logic and the logic it's self is the key to make this pattern. I often asked how to make a pattern print code, and here my tips :

1. Draw it on ms.excel 1st as given an assumption that the user will input n = 10.
2. You need to brain-storming how can a drawing you drew earlier have a connection between X,Y and N ( X and Y is looping, and N is user input ).
3. Use all possibilities, divide it, extract it, sum it, fold it, etc.
4. Good Luck! :)