Advertisement
AchkataJo

Untitled

Nov 21st, 2019
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. #include <stdio.h>
  2. int numCount(int x)
  3. {
  4. int i,c = 0;
  5. for (i = 1; i <= x; i++)
  6. {
  7. if (x % i == 0)
  8. {
  9. c++;
  10. printf("%d\n",i);
  11. }
  12. }
  13. printf("Number of dividers is: %d",c);
  14. }
  15. int main()
  16. {
  17. int x;
  18. printf("Wirite number: ");
  19. scanf("\n%d",&x);
  20. numCount(x);
  21. return 0;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement