total won't change if you change x or y. It'll add the numbers and store the result in total. Changes made to x or y after that point won't have an effect on total
#include <iostream>
usingnamespace std;
int main() {
int x = 240;
int y = 463;
int total = x + y; // total = 240 + 463 = 703
x = x + 3; // x = 240 + 3 = 243
cout << "The Value of x: " << x << endl; // x = 243
cout << "The Value of y: " << y << endl; // y = 463
cout << "Total of x, y: " << total << endl; // total = 703
return 0;
}
#include <iostream>
usingnamespace std;
int main() {
int x = 240;
int y = 463;
int total = x + y; // total = 240 + 463 = 703
x = x + 3; // x = 240 + 3 = 243
total = x + y // total = 243 + 463 = 706
cout << "The Value of x: " << x << endl; // x = 243
cout << "The Value of y: " << y << endl; // y = 463
cout << "Total of x, y: " << total << endl; // total = 706
return 0;
}