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
P
Prashant Ambardekar
said
6 months ago
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,
Imagingsolutions1978
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)