Traingle program in java


package com.javalschool;

public class Traingular {

/**
* @param args
*/
public static void main(String[] args) {
int rows = 4;
for(int i=1;i<=rows;i++)
{
for(int j=1;j<=i;j++)
{
System.out.print(" * ");
}
System.out.println();
}

}

}


output:


*
* *
* * *
* * * *

No comments:

Post a Comment