hola
a ver si te vale este codigo....
a ver si te vale este codigo....
Código [Seleccionar]
package escalera;
/**
*
* @author Kasiko
*/
public class ejer
{
final static int LONGITUD=30;
final static char CARACTER='*';
final static int ANCHOESC=5;
final static int ALTOESC=3;
final static int NUMESC=7;
/**
*
* @param args
*/
public static void main(String[] args)
{
int i,j,k,z;
int desp=0;
System.out.print("\n");
for(k=1;k<=NUMESC;k++)
{
for(i=1;i<=ANCHOESC+desp;i++)
{
System.out.print(CARACTER);
}
System.out.println();
desp+=ANCHOESC;
for(i=1;i<=ALTOESC;i++){
for(j=1;j<=desp;j++)
{
System.out.print(" ");
}
System.out.println(CARACTER);
}
// System.out.print(CARACTER);
}
}
}