+ 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
3 Answers
+ 8
remove the endl from cin
+ 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
+ 2
thanks everyone, Solved!