Hi,
I'm trying to use C++ to grab 5 digits from the user and repeat it back to the user. Unfortunately, the closest I have come to that is by repeating it back backwards...
any help here?
Hi,
I'm trying to use C++ to grab 5 digits from the user and repeat it back to the user. Unfortunately, the closest I have come to that is by repeating it back backwards...
any help here?
As you get the digits, put them in a queue. Once you are done getting the digits, just go through the queue to repeat the digits back. The queue will ensure FIFO ordering. See std::queue. http://www.cplusplus.com/reference/stl/queue/push/
Just store each digit in an array
int digits[5];
Then loop through the array, printing each digit