I'm Brazilian. I try to implement a very simple exercise from the book Principles and Practices of Programming with C ++, the statement is as follows: 1. Write a program that consists of a while loop that reads (at each loop iteration) two ints and then prints them out. End the program when a '|' is read. Here is my code: Code: #include <iostream> #include <vector> using namespace std; int main() { vector<int>num; int temp; int i=0; cout << "Write 2 numbers: \n"; while ( cin >> temp ) { cout << "First number = " << temp << "\n Write the second: "; num.push_back(temp); ++i; cin >> temp; num.push_back(temp); cout << "\n The numbers: " << num[i-1] << " and " << num[i]; cout << endl; ++i; } } I would like to complement my program so that the program ends with the typing "|". The problem is that my program ends when I type any character other than numbers.