run time error why

please can you tell the error in the code

        #include<stdio.h>
        void main()
        {int t,dist,output,j,i;
        float k;
        char a[6],b[6];
        scanf("%d",&t);
        for(i=0;i<t;i++)
        {
        scanf("%s",a);
        scanf("%s",b);
        scanf("%d",&dist);
        output=60*(10*((int)a[0]-(int)b[0])+((int)a[1]-(int)b[1]))+10*((int)a[3]-(int)b[3])+(int)a[4]-(int)b[4]+dist;
        printf("%d ",output);
        if(output>=3*dist)
        k=output-dist;
        else if(output>2*dist)
        k=(float)output/2+(float)dist/2;
        else if(output>dist)
        k=(float)output/2+(float)dist/2;
        printf("%f\n",k);
        
        
        
        }
        
        }