Sonucu yazarken "NaN" dönüyor ve sonucu gösteremiyorum
[code]
Button button1,button2;
TextView textView1,textView2,textView3,textView4,textView5,textView6,textView7;
EditText goster1,goster2,goster3,goster4,goster5,editText1,editText2,editText3,editText4,editText5;
public double guc,antenkazanc,elalanlim;
public double guvmesaf = (Math.sqrt(30*(guc)*(Math.pow(10, (antenkazanc/10)))))/(elalanlim);
public String islem;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
button1 = (Button) findViewById(R.id.button1);
button2 = (Button) findViewById(R.id.button2);
goster1 = (EditText) findViewById(R.id.editText1);
goster2 = (EditText) findViewById(R.id.editText2);
goster3 = (EditText) findViewById(R.id.editText3);
goster4 = (EditText) findViewById(R.id.editText4);
goster5 = (EditText) findViewById(R.id.editText5);
button1.setOnClickListener(this);
button2.setOnClickListener(this);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.main, menu);
return true;
}
@Override
public void onClick(View yakala) {
switch(yakala.getId()){
case R.id.button1:
islem = Double.toString(guvmesaf);
goster5.setText(" "+ islem);
break;
case R.id.button2:
goster1.setText(" ");
goster2.setText(" ");
goster3.setText(" ");
goster4.setText(" ");
goster5.setText(" ");
break;
}
// TODO Auto-generated method stub
}
[/code]