c program to find percnetage : i am a beginner in coding ,i am trying to make a program where i input 'n' number of elements in array and find out what percentage of number are positive,negative and zeros.the output is not what i am expecting it is all 'zeros'.Where i input n=3,so the percentage should be 1,1,1 when i input numbers one positive,one negative and one zero.




    #include <math.h>
    #include <stdio.h>


    int main()
    {
    int n;
    float per1,per2,per3; 
    scanf("%d",&n);
    int arr[n];
    for(int i = 0; i < n; i++){
       scanf("%d",&arr[i]);
    }
   
      int sum1=0;
      int  sum2=0;
      int sum3=0;
    
     for(int i=0;i<=n-1;i++)
    {
       
       
      if(arr[i]<0){
      int sum1=sum1+1;
        
        
    }    
    if(arr[i]>0){
           sum2=sum2+1;
            
            
            
            
        }
      else
     {
        
     sum3=sum3+1;
      }  
     }

    per1=sum1/n; 
    per2=sum2/n;
    per3=sum3/n;
    printf("%.6f\n%.6f\n%.6f\n",per1,per2,per3);
     
     return 0;
    
    }

output
 
    `3
     1
    -2
     0
     0.000000
     0.000000
     0.000000`

the last three numbers should be 1,1,1 but it is giving zeros.
