Patterns following code can print different types of pattern All pattern are in comment and the according to your need uncomment it and check the results