#include
using std::cout;
using std::cin;
using std::endl;
#include
int main()
{
cout << "Enter two integers: ";
std::istream_iterator< int > inputInt( cin );
int number1 = *inputInt;
++inputInt;
int number2 = *inputInt;
std::ostream_iterator< int > outputInt( cout );
cout << "The sum is: ";
*outputInt = number1 + number2;
cout << endl;
return 0;
}
Enter two integers: 1 2
The sum is: 3