Respuesta: Ayuda con código c# Tema Solucionado gracias a mi amigo Heimish2000, el Código es el Siguiente:
static bool CompruebaNumero (String num)
{
bool esCreciente = true;
int j = 1;
int digder = 0, digizq = 0
while ((esCreciente) && (j<num.Length))
{
digder = Convert.ToInt32(num.Substring(j, 1));
digizq = Convert.ToInt32(num.Substring((j - 1), 1));
if (digder < digizq)
{
esCreciente = false;
}
j++;
}
return esCreciente;
}
static void Main(string[] args)
{
int i, contador = 0;
int final = 999;
string aux;
for (i = 1; i <= final; i++)
{
aux = Convert.ToString(i);
if (CompruebaNumero(aux))
contador++;
}
}
Gracias por responder de todas formas |