Start a new topic

Adding two numbers does not work properly

Hi, I am trying to add two number using my code and the result obtained doesn't get added. Instead both the numbers gets clubbed together and displayed.

Num 1    = 3

Num 2    = 2

Result    = 32(instead of 5)

PFB the screenshot of my code. The button is named Power(Yet I have given addition function in order to check)



1 Comment

You are using "get text from textbox" block. This returns a string. Hence two strings are getting concatenated. You need to convert the string to an int before adding. You can do this by using "convert to int" block from Controls->Input category,

1 person likes this
Login to post a comment