Unverified Commit 3e267c0a authored by Anej's avatar Anej Committed by GitHub
Browse files

ni decimalno, razen ko je

parent 57bbd096
......@@ -35,7 +35,13 @@ public class MainActivity extends AppCompatActivity {
s = s.replace("+/-","-");
try {
vnos.setText(String.valueOf(eval(s)));
double r = eval(s);
if (Math.ceil(r) > r) {
vnos.setText(String.valueOf(eval(s)));
} else {
vnos.setText(String.valueOf((int) eval(s)));
}
} catch (Exception ex){
vnos.setText("Error");
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment