To add a variable to another variable, you can use the + operator:

Example

int x = 5;
int y = 6;
int sum = x + y;
cout << sum;




Practice Excercise Practice now