How can I make this code short
This is too long https://code.sololearn.com/c4MFwu337C73/?ref=app
Rajdeep Singh I just slightly made your code more organized. https://code.sololearn.com/cAR7C9R9qyIq
Rajdeep Singh , please give us a task description to get a better idea about how to optimize the code. thanks!
Try to extract each loop into a method or where it makes more sence into an object then in your main method use these objects and methods. Some of these methods will apper to be the same so you may add more arguments to them to avoid this duplication of code and preserve functionality. By separating concerns you will find that you can paint any logo or pattern.