Ver Mensaje Individual
  #5 (permalink)  
Antiguo 01/11/2008, 15:59
nitroxjj
 
Fecha de Ingreso: noviembre-2008
Mensajes: 4
Antigüedad: 15 años, 5 meses
Puntos: 0
Respuesta: Dibujar figuras con asteriscos

el anterior tiene un pequeño problem... aqui esta mejorado...

package jonatandelaossa;
import java.util.Scanner;
/**
*
* @author Usuario
*/
public class Asteriscos2 {
public static void main(String args[]){
int n;
Scanner input = new Scanner(System.in);
System.out.print("ingrese la base");
n = input.nextInt();
int contador = 1;
while (contador <= n)
{
int contador2 = 1;
while (contador2 <= n)
{
System.out.print ("*");
contador2++;
}
System.out.println ();
contador++;
}
}

}// espero le sirva a alguien