+ 1
Sharing is caring
https://sololearn.com/coach/1109/?ref=app update: Ite, how is this wrong now? It’s clearly correct but obviously not how it wants me to do it.
5 Réponses
0
Share your question as well as your code here
0
bruh
0
i have the same issue, my result and expected result are the same, but i guess my method was wrong:
#include <iostream>
using namespace std;
int main() {
int aquariumDavid = 8;
int aquariumAlex = 11;
int aquariumFree;
// your code goes here
aquariumFree = aquariumDavid;
aquariumDavid = aquariumAlex;
aquariumAlex = aquariumFree;
cout << "David's aquarium: " << aquariumDavid << endl;
cout << "Alex's aquarium: " << aquariumAlex;
return 0;
}
0
//I hope this will be helpful for You
#include <iostream>
using namespace std;
int main() {
int aquariumDavid = 8;
int aquariumAlex = 11;
// your code goes here
// Here You need to define the new variable for swapping
// with the help of new variable we can easily swap or interchange the values to eachother
int a=aquariumDavid;
aquariumDavid=aquariumAlex;
aquariumAlex=a;
cout << "David's aquarium: " << aquariumDavid << endl;
cout << "Alex's aquarium: " << aquariumAlex;
return 0;
}
0
Yeah, it accepts my code as correct now