You never did any string to int conversion so 3 + 7 will never = 10.
"3" + "7" = "37".
If what you want is "3" + "7" = "310" then you can do that (but I have no clue why you want to).
You need to accurately explain your input and desired output and how it differs from what you are getting.
I erased
"3" + "7" = "37".
If what you want is "3" + "7" = "310" then you can do that (but I have no clue why you want to).
You need to accurately explain your input and desired output and how it differs from what you are getting.
I erased
num_temp
in your code because it didn't do anything.