HERE IS THE MAGIC DICE
#include<stdio.h>
main(){ //{0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16}
int i,a[]={0,1,1,2,2,3,3,4,4,5,5, 6, 6, 7, 7, 8, 8}; //ARRAY OF LENGTH
16+1
int count,temp,value_of_i,m=0;
for(i=0;i<16;i++)
printf("%d ",i);
printf("\n");
for(i=0;i<16;i++)
printf("%d ",a[i]);
i=2;
value_of_i=1;
printf("\n");
//HERE WE GO
for(count=0;count<13;count++)
{
if(i%2==0) //IF IT BELONGS TO B SERIES
{
i=7+i/2;
temp=a[i];
a[i]=value_of_i;
value_of_i=temp;
printf("(%d %d) \n ",i,value_of_i);
}
else // IF IT BELONGS TO A SERIES
{
i=(1+i)/2; ;
temp=a[i];
a[i]=value_of_i;
value_of_i=temp;
printf("(%d %d)\n", i,value_of_i);
}
for(m=1;m<17;m++)
printf("%d ",a[m]);
}
printf("hi");
}
//PLS MODIFY THE CODE ... FOR PERFECT RESULTS:-)
ISINT IT BETTER THAN "A Handbook of Time-Series Analysis,
. Signal Processing and Dynamics"
. by D. S. G. Pollock
?????????????????????????????????????????????????/:-)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Algorithm Geeks" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups-beta.google.com/group/algogeeks
-~----------~----~----~----~------~----~------~--~---