Stuck on something "simple"
Go to solution
Solved by Mr_KoKa,
Then remember your position, you have your width which is cols and height which is rows
You start from x = 0 and y = 0;
You get value from user and check if x < width and y < height if it is you save the value you got from user to cell x,y and then increase x
now x = 1 and again, you do the check, if x < width
eventually x wont be < width the you zero x and increase y (you do this after you chec x < width and before checking y < height) and now you check y < height, if it is then yous ave value in x, y if it is not then it means you're out of array space.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now