Statements is missing there
Just check it where is error then please remove it..
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
VulpesPosted Nov 12, 2013, 5:53 PM
Bearing in mind that arrays in C++ are always zero-based, if the size variable is intended to represent the size of the array, then the condition for the while statement should be k < size rather than k<= size.
You might also like to include << endl; after a[i] if you don't want the array elements to appear next to each other with no space between. This will then place them on separate lines.
Posted Nov 12, 2013, 5:18 PM
Tell me have you declared variables k,size and array "a" if not then please declare them however it seems if you declared all variables then there is no error and one more thing that where is "i" if you have declared or storing index in i then store index id to i then it will work fine.