I am using Dev-C++ compiler to all my work. As a beginner I haven't yet progressed to windows app. to do any work. Thus far I think this compiler with C coding will meet my needs. The more I think about it, an algorithm would be more efficient. I'm sure there's a mathematical genius here somewhere?
Here's a part of what I've accomplished thus far:-
Code:
int main()
{
int a, b, c, d, e, f, g, h, i, j;
i = 0;
int list[3][8];
list[0][0]= 1, list[0][1]= 2, list[0][2]= 3, list[0][3]= 4, list[0][4]= 5, list[0][5]= 6,
list[0][6]= 7, list[0][7]= 8;
list[1][0]= 9, list[1][1]=10, list[1][2]=11, list[1][3]=12, list[1][4]=13, list[1][5]=14,
list[1][6]=15, list[1][7]=16;
list[2][0]=17, list[2][1]=18, list[2][2]=19, list[2][3]=20, list[2][4]=21, list[2][5]=22,
list[2][6]=23, list[2][7]=24;
for(a=0; a<3; a++)
for(b=0; b<3; b++)
for(c=0; c<3; c++)
for(d=0; d<3; d++)
for(e=0; e<3; e++)
for(f=0; f<3; f++)
for(g=0; g<3; g++)
for(h=0; h<3; h++)
fprintf(fptr,"%4d%4d%4d%4d%4d%4d%4d%4d\n",list[a][0],list[b][1],list[c][2],list[d][3],
list[e][4],list[f][5],list[g][6],list[h][7]);
system ("PAUSE");
return 0;
}
so, the output needs to include 3 numbers (1,3,5,8,9,11,13,16,17,19,21,24) with the remainder of each line resulting in 5 other numbers listed.
This is a personal project, I have no aspirations of becoming a programmer.
Keep Well, Rossco.