+ 1
C++ about variable. I don't understand how to do.
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. << Code >> #include <iostream> using namespace std; int main() { int aquariumDavid = 8; int aquariumAlex = 11; // your code goes here cout << "David's aquarium: " << aquariumDavid << endl; cout << "Alex's aquarium: " << aquariumAlex; return 0; } Help me pls. Orz
3 Answers
+ 1
Hello
For swapping you required a third variable. Please refer following code:
https://code.sololearn.com/ca2A218A10A1
0
Thanks you everyone so much âĢïļðâĢïļ