Advertisement
Guest User

Untitled

a guest
Oct 30th, 2014
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. #include<stdio.h>
  2.  
  3. int main()
  4. {
  5. int a;
  6. while(scanf("%d", &a)==1)
  7. {
  8. int i,count=0;
  9. if(a%2!=0)
  10. {
  11. count++;
  12. for(i=1; i<=a/2; i+=2)
  13. if(a%i==0)
  14. count++;
  15. }
  16. if(a%2==0)
  17. {
  18. for(i=1; i<=a/2; i+=2)
  19. if(a%i==0)
  20. count++;
  21. }
  22. printf("%d\n", count);
  23.  
  24. }
  25. return 0;
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement