Say i Debug my code and it asks me to enter numbers. IF i want to enter more than one number in the cin part, what code would i use?
like i know it would probably be something like
1 2 3 4
int nums;
cout <<" Enter your numbers." <<endl;
cin >> nums
but my question is how do i enter more than one number in the cin without having to put num1, num2, num3 and so on
What's wrong with using "num1, num2, num3"? if you know your inputting 3 numbers that works well. If you don't know how many you'll be entering you can use a loop and something like a vector to store inputs.