Text in loop to in several rows

please format code with </> button * homework policy * asking questions

Hey, I want to make a loop that counts the Numbers up to 1500 and draws them. The size is (700, 700)
so I have to make rows of numbers. Just something like that:
1 2 3 4 5
6 7 8 9 10
I use a variable max=1500.
I guess you know what I mean. I need this to make a sieve of eratosthenesā€¦

As you can see Im pretty new and also sorry for my English I hope you guys can understand what I mean :smile:

Hi @Maxnotabletoprogramm,

Can you please show us the code that you have done so far?

int max=1500;
int abstand=35;
void setup() {
size(1000, 800);
background(255);
headline();
zeichnezahlen();
}

void headline(){
textSize(26);
fill(255, 140, 0);
text(ā€œSieb des Eratosthenesā€, 50, 30);
}

void zeichnezahlen() {
textSize(12);
fill(0);
for (int z=0; z<=1500; z++){
for (int j=0; j<=100; j++){ //lƤnge
for (int i=0; i<=100; i++){ // Breite
text(z, j35, i100);
}
}
}
}

ignore the abstand (means gap)