# Text in loop to in several rows

**URL:** https://discourse.processing.org/t/text-in-loop-to-in-several-rows/22323
**Category:** Coding Questions
**Created:** [July 2, 2020, 1:46pm UTC](https://discourse.processing.org/t/text-in-loop-to-in-several-rows/22323 "2020-07-02T13:46:26Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Maxnotabletoprogramm](https://avatars.discourse-cdn.com/v4/letter/m/85e7bf/32.png) [@Maxnotabletoprogramm](https://discourse.processing.org/u/Maxnotabletoprogramm)
#### Post date: [July 2, 2020, 1:46pm UTC](https://discourse.processing.org/t/text-in-loop-to-in-several-rows/22323/1 "2020-07-02T13:46:26Z")

</div>

> please format code with \</\> button \* [homework policy](https://discourse.processing.org/faq/#homework) \* [asking questions](https://discourse.processing.org/t/2147)

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 😄

---

<div class="post-metadata">

### Author: ![jb4x](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jb4x/32/789_2.png) [@jb4x](https://discourse.processing.org/u/jb4x)
#### Post date: [July 2, 2020, 1:49pm UTC](https://discourse.processing.org/t/text-in-loop-to-in-several-rows/22323/2 "2020-07-02T13:49:02Z")

</div>

Hi @Maxnotabletoprogramm,

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

---

<div class="post-metadata">

### Author: ![Maxnotabletoprogramm](https://avatars.discourse-cdn.com/v4/letter/m/85e7bf/32.png) [@Maxnotabletoprogramm](https://discourse.processing.org/u/Maxnotabletoprogramm)
#### Post date: [July 2, 2020, 2:00pm UTC](https://discourse.processing.org/t/text-in-loop-to-in-several-rows/22323/3 "2020-07-02T14:00:21Z")

</div>

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, j_35, i_100);  
}  
}  
}  
}

---

<div class="post-metadata">

### Author: ![Maxnotabletoprogramm](https://avatars.discourse-cdn.com/v4/letter/m/85e7bf/32.png) [@Maxnotabletoprogramm](https://discourse.processing.org/u/Maxnotabletoprogramm)
#### Post date: [July 2, 2020, 2:00pm UTC](https://discourse.processing.org/t/text-in-loop-to-in-several-rows/22323/4 "2020-07-02T14:00:52Z")

</div>

ignore the abstand (means gap)
