rombo asteriscos

public class romboast { public static void main(String[] args) { int l=0; int e; int en=0; int r; int a=0; int an=1; for (l=0;l<11;l++) { e=5-l; if (e>=0) { for (en=0;en<=e;en++) { System.out.print(" "); } } else { r=(e*-1); for (en=0;en<=r;en++) { System.out.print(" "); } } if (l<=4) { a=a+2; for (an=1;an<a;an++) { System.out.print("*"); } } else { a=a-2; for (an=a;an>=-2;an--) { System.out.print("*"); } } System.out.println(""); } } }

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.