This is my program
import java.util.*;
class Triangle
{
public static void main(String Vinod[])
{
int i,j,n;
Scanner sc=new Scanner(System.in);
System.out.print("Enter a height of triangle : ");
n=sc.nextInt();
for(i=1;i<=n;i++)
{
for(j=1;j<=i;j++)
{
System.out.print("*");
}
System.out.println();
}
for(j=n;j<=1;j--)
{
for(i=j;i<=1;i--)
{
System.out.print("*");
}
System.out.println();
}
}
}
I dont know what to do now
My o/p is this:
*
**
***
****
but i want o/p like this:
*
**
***
****
***
**
*