Answers for "multiplication in java without using *"

0

multiplication without using multiplication in java

public class SumOfElements {
  
  public static void main(String[] args){
    
    int[] a = {1,2,3,4,5};
    
    
    int sum = sumArray(a);
    
   int result = multiply(5,10);
  }
  
  private static int multiply(int i , int j) {
    
    int k = 1;
    int sum = 0;
    
    while(k <= j)
    {
      sum = sum + i;
      k++;
    }
Posted by: Guest on January-22-2021

Code answers related to "multiplication in java without using *"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language