#include <cstdlib>
#include <iostream>
usingnamespace std;
int main(int argc, char *argv[])
{
int first, second;
while (cin >> first >> second);
{
cout << first << " " << second << endl;
}
return 0;
}
I have the above program. I wanted to test the cout output within a while loop. My problem is this program does not print anything on the screen until I leave the while loop by hitting a not numeric key. How can I print both numbers inmediately after I typed in?, and keep tyiping and the program should keep printing it.