Search found 1 match

by zishaniuc1745026197
Sat Jul 02, 2011 6:03 pm
Forum: Volume 3 (300-399)
Topic: 382 - Perfection
Replies: 95
Views: 19342

Why Presentation Error on 382???

Hey Please help ! Presentation error why? #include<stdio.h> int main() { long int num,i,sum; printf("PERFECTION OUTPUT\n"); while(scanf("%ld",&num)==1) { if(num==0) { printf("END OF OUTPUT\n"); break; } else { sum=0; for(i=1;i<num;i++) { if(num%i==0) sum+=i; } if(sum==num) printf("%5ld PERFECT\n",nu...

Go to advanced search