0
Which value takes "i" in code?
In line #9 in the code when I entered a line of numbers (cin>>n) what is a value of i (i=n). I mean which number from the line I entered does "i" equal or it takes the whole line of numbers https://code.sololearn.com/cv81n3Sgaw47/?ref=app
2 Réponses
+ 9
Blackcat1111 is correct about cin, but...
Since n is an integer datatype, it will only ever accept one number anyway.
To store more than one number you will want to look into arrays, or you could use a string and getline. But using an array would be easier and more appropriate for this application.
+ 4
It should take the first number as cin stops at the first space (I think).