Created
July 3, 2021 17:09
-
-
Save bijay-shrestha/5643c9df0c157909392c0fd41b277fcf to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* * Print a numbered flag | |
* * 1 | |
* * 12 | |
* * 123 | |
* * 1234 | |
* * 12345 | |
*/ | |
package com.basic.practice; | |
import lombok.extern.slf4j.Slf4j; | |
@Slf4j | |
public class PrintNumberedFlag { | |
public static void main(String[] args) { | |
for (int i = 1; i <= 10; i++) { | |
for (int j = 1; j <= i; j++) { | |
System.out.print(j); | |
} | |
System.out.println(""); | |
} | |
} | |
} |
sanjmgr
commented
Aug 16, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment