Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- - sufficienly old C defaults to int if no variable type is given.
- - no void is required for main in some version of C.
- - try to avoid if's. You can use ?: or || and && instead.
- */
- s,u,e,y,f=21,x=1;
- float c(x)
- {
- for(s=0,y=x;y>0;y--)
- s+=x%y?0:y;
- return(float)s/x;
- }
- main()
- {
- while(f)
- for(e=++x;e++<1200;)
- c(x)-c(e)||(printf("%d,%d\n",x,e),f--,e=1200);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement