0

I am making calculator in android, how to add two integers here. (Refer code in description)

int result = 0; switch(result){ case 1 : numberSeparator = et.getText().toString().split("+"); int firstNumber = Integer.valueOf(numberSeparator[0]); int lastNumber = Integer.valueOf(numberSeparator[1]); int myresult = firstNumber + lastNumber; // 1 + 1 = 2 et.setText("" + myresult); break; }

2nd Jan 2017, 9:30 AM
Shoeb Quraishi
Shoeb Quraishi - avatar
3 Respuestas
0
I didn't get your issue. Do you want us to debug your code code, which seems free of bugs. Or do you like us to give you hints for other ways to solve this problem?
2nd Jan 2017, 9:58 AM
Andreas K
Andreas K - avatar
0
hint or a solution will be enough bcoz I m stuck here since a week long cannot move further. please help. where am I going wrong?
2nd Jan 2017, 10:01 AM
Shoeb Quraishi
Shoeb Quraishi - avatar
0
How do you want to solve your input? By reading complete lines? Are more than one operator per line possible?
2nd Jan 2017, 10:31 AM
Andreas K
Andreas K - avatar