DEV Community

Biswa ranjan Patra
Biswa ranjan Patra

Posted on

down and left side triangle in java

`public class DownLeftTrangle {

public static void main(String[] args) {
    for(int i=1;i<=5;i++)
    {
        for(int j=i;j<=5;j++)
        {
            System.out.print(j);
        }
        System.out.println();
    }

}
Enter fullscreen mode Exit fullscreen mode

}`

output:-

12345
2345
345
45
5

Top comments (0)

Some comments may only be visible to logged-in visitors. Sign in to view all comments.