I have written a program that might do what you want:
#include <iostream>
using std::cout;
using std::endl;
using std::cin;
int main()
{
int value1;
int value2;
cin >> value1;
cout << "\x1b[1A" << value1 << ", ";
cin >> value2;
cout << endl;
cout << value1 << endl;
cout << value2 << endl;
}
What it does is that it jumps back to the last line, reprints the old input and an additional comma, then prompts for new input.
The problem with this is that this uses the ANSI.SYS standard for the line jump sequence \x1b[1A, which means that this will not necessarily work anywhere. I tried to use it in cpp.sh, there it doesn't work (http://cpp.sh/63ggd), but it works when I compile it under the linux I'm currently using.
If you trust enough in it, go for it, and maybe extend for it for windows using winapi, see How To Use SetConsoleCursorPosition Func.
(The basic underlying problem is that the basic console sequences come from a time when the output of a computer was printed out physically, so jumping back did not make sense back then, although you can indeed jump at the start of the current line. The console sequences were never officially extended since then, there are only additional standards to do tricks like this.)