diff --git a/half pyramid program b/half pyramid program new file mode 100644 index 0000000..1e413fc --- /dev/null +++ b/half pyramid program @@ -0,0 +1,13 @@ +public class Pattern { + + public static void main(String[] args) { + int rows = 5; + + for(int i = 1; i <= rows; ++i) { + for(int j = 1; j <= i; ++j) { + System.out.print(j + " "); + } + System.out.println(); + } + } +}