• + 0 comments
    int n,x,y=0; 
        scanf("%d",&n);
        int *point =(int*)malloc(sizeof(int) * n);
        for(int i = 0; i < n; i++){
           scanf("%d",&point[i]);
            if(point[i]>=point[i+1])
                {
                x=point[i];
                point[i]=point[i+1];
                point[i+1]=x;}
        }
                
                    for(int i = 0; i < n; i++)  {
                     if(point[i]=point[i+1])
                         {y=y+1;
                         }
                 }
            
           
               
               printf("%d %d",point[0]*2,y);
    

    CAN ANYBODY TELL ME WHAT IS THE PROBLEM IN THIS CODE