0
What is wrong with my array???
I want to output number of array and numbers itself. Code should accept values until it's not equal - 1. But something goes wrong.... https://code.sololearn.com/cy8yveyOMqwo/?ref=app
4 Answers
+ 2
There are lots of error first error it showing in header file dont guve extra space <> before <
Once check your loop condition is it x!=-1 or it should be i instead of x . Why u writing again same condition in if condition in for loop you have already written. Then in printing statement you have written array name only u should use for loop to print all value u Can't print at a time with all values .
+ 1
To output the array. You need to make another loop and output arr[i].