I have to write a program where the user would input multiple numbers.
This is what it could look like.
3 29 98 78 88 100 9 70 73 81
The input is never the same, and I just need to access each number one at a time.
My problem is that I don't know how to store more than one character in a variable.
This is what I have currently:
char inputA; char inputB; cin.get(inputA); cin.get(inputB);
I would use this function, but this function wouldn't work because the number of inputs the user would put into the console would be different all the time.
Example input: 3 29 98 cin << num1 << num2 << num3;
And finally I need to use these numbers for calculations, so I can't concatenate them into a string either. I can't use arrays or create my own functions.
Sorry if this doesn't make sense its 2:32 AM I'm about to die from lack of sleep.
Edited by chudapati09: n/a