Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Govnokod2 {
- public static void main(String[] args) {
- for (int lineNumber = 1; lineNumber <= 6; lineNumber++) {
- for (int posInline = 1; posInline <= lineNumber; posInline++) {
- System.out.print(((posInline != 1) ? "-" : "")
- + ((lineNumber % 2 != 0) ? posInline : (lineNumber - posInline + 1)));
- }
- System.out.println();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement