R
danke, konnte das problem mit eurer hilfe lösen ...
hier der code. Irgendwie hatte ich ein Brett vor dem Kopf, man kann das Problem mit nur einer for-schleife und grundliegender mathematik lösen, die mir manchmal fehlt ..... ...
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
main(void){
int tan[200];
int i,z1,z2, zufall,x,y;
srand(time(0));
for(i=1;i<=200;i++){
z1 = rand();
z2 = rand();
zufall = 10*z1+z2;
tan[i]=zufall;
}
printf("Nr. TAN\tNr. TAN\tNr. TAN\tNr. TAN\n===========================================================\n");
for(x=1;x<=50;x++){
printf("%.3i %.6i\t",x, tan[x] );
printf("%.3i %.6i\t",x+50, tan[x+50] );
printf("%.3i %.6i\t",x+100, tan[x+100] );
printf("%.3i %.6i\n",x+150, tan[x+150] );
}
}