0
C# quiz
imagine 1billion balls in a box, 90% black 10% white , a robot must pick each ball, inspect its color and put the blacks in a black box, the whites in a white one. u r writing a snippet(part of a loop) to make the robot decide where to place each ball , which one u choose to make the robot finish earlier
2 Respuestas
+ 8
obviously the 2nd one
0
string color =GetBallColor();
switch (color){
case "white":
PutInWhiteBox();
break;
case "black":
PutInBlackBox();
break;}
OR
string color =GetBallColor();
switch (color){
case "black":
PutInBlackBox();
break;
case "white":
PutInWhiteBox();
break;}