fork download
  1. using System;
  2. using System.Collections.Generic;
  3.  
  4. public class Test
  5. {
  6. public static void Main()
  7. {
  8. List<List<int>> matriz = new List<List<int>>();
  9. matriz.Add(new List<int> {3, 4, 1} );
  10. matriz.Add(new List<int> {2, 4, 5} );
  11. matriz.Add(new List<int> {44, 8, 9} );
  12. int busca = 1;
  13. for(int a = 0; a < matriz.Count; a++) {
  14. for(int b = 0; b < matriz[a].Count; b++) {
  15. if (matriz[a][b] == busca) {
  16. Console.WriteLine("Busca: {0}, Linha: {1}, Coluna: {2}", busca, a, b);
  17. }
  18. }
  19. }
  20. }
  21. }
Success #stdin #stdout 0.02s 14948KB
stdin
Standard input is empty
stdout
Busca: 1, Linha: 0, Coluna: 2