Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void findPos(int searchPos , int maxRows, int maxColumns)
- {
- if (searchPos != 0)
- {
- searchPos += 1;
- }
- int nCount = 0;
- int j = 0, i = 0;
- for(i = 0; i< maxRows; i++)
- {
- if(nCount == searchPos)
- {
- Console.WriteLine("FOUND!\nRow: " + i + "Col: " + j);
- break;
- }
- Console.WriteLine("Row: " + i);
- nCount++;
- for( j = 0; j < maxColumns; j++)
- {
- if (j == 0)
- continue;
- if (nCount == searchPos)
- {
- Console.WriteLine("FOUND!\nRow: " + i + "Col: " + j);
- break;
- }
- Console.WriteLine("Col: " + j);
- nCount++;
- }
- }
- Console.WriteLine(nCount);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement