Christian P.

Salazar FM: 09201

Oct. 9, 2010

#include<stdio.h> #include<conio.h> void main() { clrscr(); int num, x, sum=0; printf("enter a number"); scanf("%d",&num); printf("the factors of the number are:"); for(x=1;x<num;x++) { if (num % x==0) { printf("%d",x); sum=sum+x; } } printf("\nThe sum of the factors is : %d",sum); if (sum==num) printf("\ndwarf"); else printf("not dwarf"); getch(); }

Master your semester with Scribd & The New York Times

Special offer for students: Only $4.99/month.

Master your semester with Scribd & The New York Times

Cancel anytime.