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
package practice;
import java.util.Scanner;
public class Practice {
public static void main(String[] args) {
for(int i=0;i<=10;i++)
{
if(i<=5)
{
for(int k=1;k<=5-i;k++)
{
System.out.print(" ");
}
for(int j=0;j<=i;j++)
{
System.out.print(" *");
}
}
if(i>5)
{
for(int k=0;k<=i-6;k++)
{
System.out.print(" ");
}
for(int j=0;j<=10-i;j++)
{
System.out.print(" *");
}
}
System.out.println();
}
}
}