Saturday, 26 November 2016

How To Create Triangle In Java

Hi Friends,
Today we came with new programming problem and solution. It is always problem for students to form a structure in programming language. "How To Create Triangle In Java"  or "Write a program to make a Triangle" requires Lot of Logical skills. 





It is all about of managing loops and conditions in such a fashion. So, Here We are Writing A program That will Form a Triangle.





class TriangleFormation
{
public static void main(String[] args)
{
for(int i=1;i<=6;i++){
for(int j=0;j<i;j++){
System.out.print("*");
}
System.out.println();
}
}
}

Happy Coding.....
Thank you(SmartiesGeeks)

No comments:

Post a Comment

Make Top Rank Blog