#include<stdio.h> int main() { int a, b, s = 0; for (b = 2; b<= 100; b++) { s = 0; for (a = 1; a < b; a++) if (b % a == 0) s = s + a; if (s == b) printf("% d", b); } }