Ver Mensaje Individual
  #3 (permalink)  
Antiguo 04/02/2011, 06:19
ceslagos
 
Fecha de Ingreso: febrero-2011
Mensajes: 15
Antigüedad: 14 años
Puntos: 0
Respuesta: Ayuda Urgente!!

static void Main(string[] args)
{
int i, j, contador = 0, digder = 0, digizq = 0, sw = 0;
int final = 999;
string aux;
for (i = 1; i <= final; i++)
{
aux = Convert.ToString(i);
if (aux.Length > 1)
{
for (j = 1; j < aux.Length; j++)
{
digder = Convert.ToInt32(aux.Substring(j, 1));
digizq = Convert.ToInt32(aux.Substring((j - 1), 1));
if (digder <= digizq) sw = 1;
else sw = 0;
}

if (sw == 0) contador++;
}
}

ahí hice el cambio pero aún así me da 441 parece que comprendi mal el enunciado :s