printing an array with spaces excluding the last element

I was given the task to write a code that takes inputs from the user that include the following: -length of a certain race -the speed of Achilles(the main participant) -the number of participants excluding Achilles -the head start that each participant will get (a head start from Achilles). -speed of each participant. I then was asked to calculate the time that takes Achilles and each participant to finish the race and then the output would be: 1.the time that took Achilles to finish the race 2.the one’s that took a shorter time than Achilles to finish the race 3.the one’s that finished the race after Achilles (3&2 in the same line and the order is the same order of the input. one space between each number excluding the lase) 3.When Achilles finished the race Example: input: 100 9.5 5 20 7.5 90 1.2 10.6 4.25 80 1.7 50 7.3
output: 10.53 8.33 6.85 10.67 21.04 11.76 3 now I wrote the code and it works fine but I can’t succeed to eliminate the last space from the third line of the output. (for example: following the output written above my output is “11.76 ” the code that I wrote:

#include <stdio.h>  int main() { int length,size,cnt1=0,i; float speed1,speed2[7],distance[7],time1,time2[7],small[7],big[7]; scanf("%d",&length); scanf("%f",&speed1); scanf("%d",&size); time1=(float)length/speed1; for(i=0;i<size;i++){     scanf("%f%f",&distance[i],&speed2[i]); } for(i=0;i<size;i++){     time2[i]=((length-distance[i])/speed2[i]); } if(distance[i]>=length)     time2[i]=0; printf("%.2f",time1); printf("\n");  for(i=0;i<size;i++){     if(time2[i]<time1){         small[i]=time2[i];         printf("%.2f ",small[i]);         cnt1++;     } } for(i=0;i<size;i++){     if(time2[i]>=time1){         big[i]=time2[i];      printf("%.2f",big[i]);     if(i+1<size)         printf(" ");     } } printf("\n"); printf("%d",cnt1+1);      return 0; }