Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
emrebil authored Dec 2, 2019
1 parent 9ca2b67 commit 94bb664
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions MT2-exercises/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,19 +96,19 @@ Return the sum of these multiplications.
311

### Q4
Read n as the size of the array.
Then, read n integers and fill the array.
Then, read an integer as m as starting index.
Then, read an integer as k and assume it is positive.
Send them to a void function named "func".
You will modify the array.
Perform following operation k times.
Starting direction is right.
Check the current element in the index m.
Take module of the current element with 3.
If it is 1, set direction to right, else if it is 2, set direction to left and in both cases, set value to 0 of the current index.
In the next operation, m must be m + 1 or m - 1 according to direction.
If you go out of the array, jump other end of the array.
Read n as the size of the array.
Then, read n integers and fill the array.
Then, read an integer as m as starting index.
Then, read an integer as k and assume it is positive.
Send them to a void function named "func".
You will modify the array.
Perform following operation k times.
Starting direction is right.
Check the current element in the index m.
Take module of the current element with 3.
If it is 1, set direction to right, else if it is 2, set direction to left and in both cases, set value to 0 of the current index.
In the next operation, m must be m + 1 or m - 1 according to direction.
If you go out of the array, jump other end of the array.

Input:
7
Expand Down

0 comments on commit 94bb664

Please sign in to comment.