Get text from 2 edittext when 3rd is empty
===

I have an activity with 3 EditTexts and Button. User can fill two edittexts (edittext 1 and 2 or 1 and 3). Always one edit text (2nd or 3rd) must be empty. After click button shows the correct results. I dont know how to change my code. If I have empty edittext the application has stopped unexpectly. If I insert value 0 to no use edittext everythings are ok. Has anyone got any ideas? How to solve this problem? Thanks a lot for help.
this is my main activity code:

       public class Glowna extends Activity implements OnClickListener{


    @Override
    public void onCreate(Bundle savedInstanceState) {

    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);
    View button1Button = this.findViewById(R.id.oblicz);
    button1Button.setOnClickListener(this);             
    } 
    public void onClick(View v){ 
    EditText numa = (EditText)findViewById(R.id.a); 
    EditText numb = (EditText)findViewById(R.id.b); 
    EditText numc = (EditText)findViewById(R.id.c); 
    float eq1 = 0; 
    float eq2 = 0; 
    float eq3 = 0; 
    float eq4 = 0; 
    float num1 = Float.parseFloat(numa.getText().toString()); 
    float num2 = Float.parseFloat(numb.getText().toString()); 
    float num3 = Float.parseFloat(numc.getText().toString());


    if (num1>0 & num2>0){
    try{
    switch (v.getId()) {
        case R.id.oblicz:
        eq1 = 4*num1;
        eq2 = num1*num2;
        break;  }
    String wynik1 = Float.toString(eq1);
    String wynik2 = Float.toString(eq2);
     Intent i = new Intent(this, Wynik.class);
     i.putExtra("a",wynik1);
     i.putExtra("b",wynik2);
    startActivity(i); }

    catch (NumberFormatException e) {Intent o = new Intent(this, Komunikat.class);
    startActivity(o); return; }}


    else if (num1>0&num3>0){
    try{
    switch (v.getId()) {
    case R.id.oblicz:
    eq4 = 4*num1;
    eq3 = (num3/2)*num3;
    break;  }
    String wynik4 = Float.toString(eq4);
    String wynik3 = Float.toString(eq3);
    Intent j = new Intent(this, Wynik1.class);
    j.putExtra("d",wynik4);
    j.putExtra("c",wynik3);
    startActivity(j); }
    catch (NumberFormatException e) {Intent o = new Intent(this, Komunikat.class);
    startActivity(o);
    return;}}      

    else {Intent o = new Intent(this, Komunikat.class);
    startActivity(o);}  

    }}


  