Hollow Diamond Pattern(Pattern 6). Can't find why the scores are not awarded even when the code is working right
The stars you are printing need to be tab-separated.
for(i=1;i<=totalrows;i++) System.out.print("* ");
System.out.println();}
else {
for(cst=1;cst<=nst;cst++) {System.out.print("* ");
}
for(csp=1;csp<=nsp;csp++){System.out.print(" ");}
for(cst=1;cst<=nst;cst++) {System.out.print("* ");}