I am working on an android app and need some help with a calculation code. A user is required to enter a value 1-5000000 into a text field (EditText), a button (calculate) is pressed, when this happens the entered number needs to be multiplied by 10% and the answer displayed on screen in a text field (EditText). Below is the code i am working on:
public void operation(){
if(optr.equals("*")){
amt = Integer.parseInt(num.getText().toString());
amt = num * 10%;
num1.setText(Integer.toString(amt));
}