Advertisement
jordanov

zadaca 3 #nizi

Dec 7th, 2015
375
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.42 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. int main()
  5. {
  6.     int n;
  7.     int x;
  8.     int a[100];
  9.     int i;
  10.     int j;
  11.     int br;
  12.  
  13.     scanf("%d", &n);
  14.     for(i=0;i<n;i++)
  15.     {
  16.         scanf("%d", &a[i]);
  17.     }
  18.     for(i=0;i<n;i++)
  19.     {
  20.         x=a[i];
  21.         br=0;
  22.         for(j=1;j<=x;j++)
  23.         {
  24.             if(x%j==0)
  25.                 br++;
  26.         }
  27.     }
  28.  
  29.  
  30.     printf("%d", br);
  31.     return 0;
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement