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:
Exercise - Book Programming-Principles-and-Practice-Using-C++
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 (...