
134 Data Structures Using C
num 5 LIST[i];
count 5 0;
/* Compute the factors */
pair_of_factors[0][0] 5 1;
pair_of_factors[0][1] 5 num;
for (j 5 2 ; j <5 sqrt(num); j++)
{
if (num % j 55 0)
{
count++;
pair_of_factors[count][0] 5 j;
pair_of_factors[count][1] 5 num/j;
}
}
/* Check for nastiness */
for (j 5 0; j <5 count; j++)
{
diff 5 pair_of_factors[j][1] − pair_of_factors[j][0];
for (k 5 0; k < 5 count; k++)
{
sum 5 pair_of_factors[k][1] + pair_of_factors[k][0];
if (diff 55 sum)
{
printf (“\n %d is a Nasty number”, num);
break; ...