Function multiply android and swift
Android Swift
// Declare our new function
int multiply(int a,int b)
{
        int temp=a*b;
        return temp;
}

// Call it
int product = multiply(2,5);

Log.e("multiply:",""+ product);

 

// Declare our new function
func multiply(a:Int, b:Int)->Int {
    return a*b
}

// Call it
let product = multiply(2,b:5)

print(product)

 

 

Comments