C++ Program doubt

Write a program using loop to find the values of x and y that correspond to the term on RHS
x+y=5

@yutikakhanna what are permissible values for x and y?

All the possible values of x and y need to be displayed like 0+5 , 1+4 , 2+3 etc

@yutikakhanna you can simply do it by
for(int i=0;i<=rhs;i++)
cout<<i<<" + "<<rhs-i<<endl;

ok and what will be the same for x-y=10

@yutikakhanna yes but in this case number of solutions are infinite!!

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.