i need to set 10 random expression using random operation
<p>what i m trying to do is set 10 questions with random expression with randon operators +-/*. but the problem tht i m getting is that the random expressions never stops when # is pressed</p>

<p>code is </p>

<pre><code>public void onClick(View arg0) {



        switch(arg0.getId()){   
        case R.id.keypad_hash:

            fnum0 = (int) ((double) ((Math.random() * 10))); 
            snum0 = (int) ((double) ((Math.random() * 10))); 
            String str = ""; 
            int operation = (int) ((double) ((Math.random() * 10))); 


            if(operation == 0)  
               str = fnum0 + "+" + snum0; 
            else if(operation == 1) 
               str = fnum0 + "-" + snum0; 
            else if(operation == 2)  
               str = fnum0 + "*" + snum0; 
            else  
               str = fnum0 + "/" + snum0; 

            display.setText(str); 





        }   
     });
</code></pre>

<p>thanks in advanvce</p>
