So I was assigned to make a diamond with asterisks in Java and I\'m really stumped. Here\'s what I\'ve come up with so far:
public class Lab1
{
public s
class Inc_Dec
{
public static void main(String[] args)
{
int le=11;int c=0;int j1=(le/2)+1;int j2=le-j1;
for(int i=1;i<=le;i++)
{
if(c0;k--)
{
System.out.print(" ");
}
for(int j=1;j<=i;j++)
{
System.out.print("*"+" ");
}
c++;
System.out.println();
}
else
{
for(int k=(i-j1);k>0;k--)
{
System.out.print(" ");
}
for(int j=(le-i+1);j>0;j--)
{
System.out.print("*"+" ");
}
System.out.println();
}
}
}
}