Generating Random Sequence of A Set of Ordered Co-ordinates


I need to take a sequenced set of coordinates and then make a random order of them just like the picture above. I am stuck up. Kindly help

#include<stdio.h>
#include<stdlib.h>
#include<time.h>
#include<math.h>
void urand(int lim,int a[])
{ float k;
int i,j,b[lim],temp,index=0,flag=0;
srand ( time(NULL) );
while(index<=lim)
{
temp=rand()%10;
//printf("temp=%d
",temp);
if(index==0){
b[index]=temp;
//printf("ftemp=%d
",temp);
index++;
}
else {
for(i=0;i<=index;i++){
if(temp==b*){
flag=0;
break;
}
else flag=1;
}
if(flag==1){
b[index]=temp;
index++;
}
}
k++;
if(k>=100)break;
}
for(i=0;i<index;i++){
a*=b*;
}
}

int main()
{
	int m,a1[10][10],n,b[10],i,j;
	float d[10],e[10],c[10],pxr[10],pyr[10],pzr[10];
	
		for(i=0;i<10;i++){
			scanf("%f%f%f",&c*,&d*,&e*);
			/*c*=i;
			d*=i;
			e*=i;*/
			//printf("%d %d %d

",c*,d*,e*);
}
urand(9,b);

	//printf("%d %d

“,b[9],c[9]);
for(m=0;m<10;m++){
printf(”%.2f %.2f %.2f --> %.2f %.2f %.2f
",c[m],d[m],e[m],c[b[m]],d[b[m]],e[b[m]]);
/pxr[m]=c[b[m]];
pyr[m]=d[b[m]];
pzr[m]=e[b[m]];
/

	}

}

Where is the problem? You do not know how to generate random numbers? Try to use Google for query “random cpp”…