Twitter Feed Facebook Google Plus Youtube

Adsense responsive

Recent Post below header

Friday, 1 March 2013

JAVA PROGRAM: TO MULTIPLY TWO NUMBERS WITHOUT USING ARITHMETIC OPERATOR *


CODING OF MULTIPLY BUTTON(jButton1)
        int num1,num2,i,mul=0;
        num1=Integer.parseInt(jTextField1.getText());
        num2=Integer.parseInt(jTextField2.getText());
        for(i=1;i<=num2;i++)
         mul+=num1;
        jTextField3.setText(" "+mul);

CODING OF CLEAR BUTTON(jButton2)
        jTextField1.setText(" ");
        jTextField2.setText(" ");
        jTextField3.setText(" ");


CODING OF EXIT BUTTON(jButton3)
        System.exit(0);


CODING

RUNNING

We have used NetBeans IDE 7.2.1. To download it visit www.netbeans.org

For any query or suggestion please comment below...

No comments:

Post a Comment