+ 1

Anyone knows? I don't get the right code

David and Alex each have aquariums. There are 8 Rainbowfishes in David’s aquarium, and 11 Angelfishes in Alex’s aquarium. Help them exchange their fishes between them. Complete the code to swap the values of variables between aquariumDavid and aquariumAlex.

9th Sep 2021, 9:54 AM
Christian Joseph E Marigmen
Christian Joseph E Marigmen - avatar
4 Antworten
+ 5
Christian Joseph Marigmen If you have ever written code on swaping 2 values then you can solve it. You just have to swap values.
9th Sep 2021, 9:56 AM
A͢J
A͢J - avatar
+ 2
Christian Joseph Marigmen Think of this as a real life problem. You want to swap fish without any chance of those fish getting mixed up. Best option, get a 3rd tank David puts fish in 3rd tank Alex puts fish in David's tank 3rd tank puts fish in Alex's tank Now David has Alex's fish & Alex has David's fish
9th Sep 2021, 10:42 AM
Rik Wittkopp
Rik Wittkopp - avatar
+ 1
Thank you ☺️
9th Sep 2021, 9:57 AM
Christian Joseph E Marigmen
Christian Joseph E Marigmen - avatar