You are viewing a single comment's thread. Return to all comments →
var alice : Int = 0 var bob: Int = 0
fun compareTriplets(a: Array, b: Array): Array { for(i in 0..2){ if(a[i]>b[i]){ alice++ }else if(a[i]==b[i]){ }else{ bob++ } }
return arrayOf(alice,bob) }
Seems like cookies are disabled on this browser, please enable them to open this website
Compare the Triplets
You are viewing a single comment's thread. Return to all comments →
*KOTLIN
var alice : Int = 0 var bob: Int = 0
fun compareTriplets(a: Array, b: Array): Array { for(i in 0..2){ if(a[i]>b[i]){ alice++ }else if(a[i]==b[i]){ }else{ bob++ }
}
return arrayOf(alice,bob) }