+ 2

How can I make this code short

This is too long https://code.sololearn.com/c4MFwu337C73/?ref=app

27th Nov 2021, 12:56 PM
Rajdeep Singh
Rajdeep Singh - avatar
4 Answers
+ 1
Rajdeep Singh I just slightly made your code more organized. https://code.sololearn.com/cAR7C9R9qyIq
27th Nov 2021, 4:44 PM
SoloProg - avatar
+ 6
Rajdeep Singh , please give us a task description to get a better idea about how to optimize the code. thanks!
27th Nov 2021, 2:37 PM
Lothar - avatar
+ 2
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.
27th Nov 2021, 1:37 PM
Kamen Studentov
Kamen Studentov - avatar
+ 1
Thanks bro
28th Nov 2021, 2:43 AM
Rajdeep Singh
Rajdeep Singh - avatar