# How do i take a input that is space separated?

**URL:** <https://discourse.processing.org/t/how-do-i-take-a-input-that-is-space-separated/34905>\
**Category:** Coding Questions\
**Created:** [January 31, 2022, 2:50am UTC](https://discourse.processing.org/t/how-do-i-take-a-input-that-is-space-separated/34905 "2022-01-31T02:50:35Z")\
**Posts on this page:** 6\
**Page:** 2

<div class="post-metadata">

**Author:** ![Zan](https://avatars.discourse-cdn.com/v4/letter/z/48db29/32.png) [@Zan](https://discourse.processing.org/u/Zan)\
**Post date:** [February 7, 2022, 7:58am UTC](https://discourse.processing.org/t/how-do-i-take-a-input-that-is-space-separated/34905/23 "2022-02-07T07:58:17Z")

</div>

Do i change the x in the for loop?

---

<div class="post-metadata">

**Author:** ![Zan](https://avatars.discourse-cdn.com/v4/letter/z/48db29/32.png) [@Zan](https://discourse.processing.org/u/Zan)\
**Post date:** [February 7, 2022, 8:05am UTC](https://discourse.processing.org/t/how-do-i-take-a-input-that-is-space-separated/34905/24 "2022-02-07T08:05:07Z")

</div>

I tried dividing but it gave me the error "  
The operator / is undefined for the argument type(s) int, int[]

---

<div class="post-metadata">

**Author:** ![Chrisir](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/chrisir/32/45_2.png) [@Chrisir](https://discourse.processing.org/u/Chrisir)\
**Post date:** [February 7, 2022, 8:39am UTC](https://discourse.processing.org/t/how-do-i-take-a-input-that-is-space-separated/34905/25 "2022-02-07T08:39:42Z")

</div>

> [@Zan](#):
>
> operator / is undefined for the argument type(s) int, int

Say something like scale1=int(…/…);

---

<div class="post-metadata">

**Author:** ![Zan](https://avatars.discourse-cdn.com/v4/letter/z/48db29/32.png) [@Zan](https://discourse.processing.org/u/Zan)\
**Post date:** [February 9, 2022, 5:56am UTC](https://discourse.processing.org/t/how-do-i-take-a-input-that-is-space-separated/34905/26 "2022-02-09T05:56:09Z")

</div>

Hmm i got the same issue too

---

<div class="post-metadata">

**Author:** ![Chrisir](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/chrisir/32/45_2.png) [@Chrisir](https://discourse.processing.org/u/Chrisir)\
**Post date:** [February 9, 2022, 6:29am UTC](https://discourse.processing.org/t/how-do-i-take-a-input-that-is-space-separated/34905/27 "2022-02-09T06:29:53Z")

</div>

Did you take the sum of the array?

You can’t take the array

Show your code because otherwise we can’t see what you do

---

<div class="post-metadata">

**Author:** ![Chrisir](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/chrisir/32/45_2.png) [@Chrisir](https://discourse.processing.org/u/Chrisir)\
**Post date:** [February 9, 2022, 9:40am UTC](https://discourse.processing.org/t/how-do-i-take-a-input-that-is-space-separated/34905/28 "2022-02-09T09:40:18Z")

</div>

> [@Zan](#):
>
> How do you make sure the input u key in will fit the screen entirely, for example, if you key 3 numbers you can only see 3 of them and not have a empty space

that’s a new goal that was not part of the original.

Do you understand my solution, why I wrote to take the sum?

[Previous page](https://discourse.processing.org/t/how-do-i-take-a-input-that-is-space-separated/34905.md?page=1)
