Advertisement
rotti321

T4 2021 SIII ex 1

May 19th, 2021
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int joc(int n){
  5. int k=0;
  6. for(int i=2;i<=n;i++)
  7. {
  8. if(n%i==0)
  9. {
  10. k++;
  11. }
  12. }
  13. return k;
  14. }
  15.  
  16. int main() {
  17. int n;
  18. cin>>n;
  19. cout<<joc(n);
  20. return 0;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement