Write a program in java to find out multiplication of a given number without using multiply sign?

class Multiply

{

                public static void main(String arg[])

                {

                                int a=3,b=9,s=0,i=0;

                                for(i=1;i<=b;i++)

                                                s=s+a;

                                System.out.println(s);

                }

}

Multiply.PNG

, , , , , ,

Leave a Reply