+ 2

What is the problem in this code?

i want to make the output of the array through a function https://code.sololearn.com/cmgB7OLc24DG/?ref=app

1st May 2017, 4:21 AM
Soham Biswas
Soham Biswas - avatar
3 odpowiedzi
+ 8
remove the endl from cin
1st May 2017, 4:49 AM
jay
jay - avatar
+ 3
-endl isn't used with cin, it's for printing a new line, and hence for cout -myArr[3] is actually 3 elements, from 0 to 2
1st May 2017, 4:55 AM
Youssef Elkilany
Youssef Elkilany - avatar
+ 2
thanks everyone, Solved!
1st May 2017, 5:04 AM
Soham Biswas
Soham Biswas - avatar