Created
October 20, 2014 00:51
-
-
Save rogerfor/70544a74a5cae88d32c0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int n, a = 0; | |
Console.WriteLine("Digite un numero: "); | |
n = Convert.ToInt16(Console.ReadLine()); | |
for (int i = 1; i < n; i++) | |
{ | |
if (n % i == 0) | |
{ | |
a = a + i; | |
} | |
} | |
if (a > n) | |
{ | |
Console.WriteLine("El número es abundante "); | |
} | |
else | |
Console.WriteLine("El número no es abundante "); | |
Console.ReadKey(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment