# Transform two int into one int

**URL:** <https://discourse.processing.org/t/transform-two-int-into-one-int/12604>\
**Category:** Beginners\
**Created:** [July 8, 2019, 9:50pm UTC](https://discourse.processing.org/t/transform-two-int-into-one-int/12604 "2019-07-08T21:50:47Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![hugo](https://avatars.discourse-cdn.com/v4/letter/h/b38774/32.png) [@hugo](https://discourse.processing.org/u/hugo)\
**Post date:** [July 8, 2019, 9:50pm UTC](https://discourse.processing.org/t/transform-two-int-into-one-int/12604/1 "2019-07-08T21:50:47Z")

</div>

Hello,  
I have two int variable that I would like to put end to end to form only one int variable :

```auto
int a= 2, b= 3;
int c=//I would like variable c to be equal to 23

```

Do you have an idea to solve my problem ?  
Thank you.

---

<div class="post-metadata">

**Author:** ![GoToLoop](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/gotoloop/32/86_2.png) [@GoToLoop](https://discourse.processing.org/u/GoToLoop)\
**Post date:** [July 8, 2019, 10:01pm UTC](https://discourse.processing.org/t/transform-two-int-into-one-int/12604/2 "2019-07-08T22:01:34Z")

</div>

[Processing.org/reference/strconvert\_.html](http://Processing.org/reference/strconvert_.html)  
[Processing.org/reference/intconvert\_.html](http://Processing.org/reference/intconvert_.html)

```auto
int a = 2, b = 3;
int c = int(str(a) + b);
println(a, b, c);
exit();

```

---

<div class="post-metadata">

**Author:** ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)\
**Post date:** [July 8, 2019, 10:03pm UTC](https://discourse.processing.org/t/transform-two-int-into-one-int/12604/3 "2019-07-08T22:03:42Z")

</div>

Write the code to do this mathematical expression:

`2*10 + 3*1 = 23`

🙂

---

<div class="post-metadata">

**Author:** ![hugo](https://avatars.discourse-cdn.com/v4/letter/h/b38774/32.png) [@hugo](https://discourse.processing.org/u/hugo)\
**Post date:** [July 9, 2019, 9:54am UTC](https://discourse.processing.org/t/transform-two-int-into-one-int/12604/4 "2019-07-09T09:54:14Z")

</div>

Thank you very much. 👍
