Fastjur

Untitled

Oct 5th, 2016
237
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.24 KB | None | 0 0
  1. try {
  2.   Float num1 = Float.parseFloat(text);
  3.   Float num2 = Float.parseFloat(text2);
  4.   Float sum = ( num2 / ( ( num1 * num1 ) / 10000 ) );
  5.   t1.setText(String.valueOf(sum));
  6. } catch (NumberFormatException ex) {
  7.   t1.setText("Invalid");
  8. }
Advertisement
Add Comment
Please, Sign In to add comment