Untitled
unknown
plain_text
10 months ago
296 B
3
Indexable
private static bool JeLiSavrsenBroj(int broj)
{
int provjera = broj / 2;
int suma = 0;
for (int i = 1; i <= provjera; i++)
{
if (broj % i == 0)
{
suma += i;
}
}
if (suma == broj)
{
return true;
}
else return false;
}Editor is loading...
Leave a Comment