Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.IO;
- using System.Collections.Generic;
- namespace ConsoleApp1
- {
- class Program
- {
- static void Main(string[] args)
- {
- string[] lines = System.IO.File.ReadAllLines(@"C:\Users\local\source\repos\ConsoleApp1\ConsoleApp1\probki.txt");
- string[] Linestypes = System.IO.File.ReadAllLines(@"C:\Users\local\source\repos\ConsoleApp1\ConsoleApp1\typy.txt");
- List<String[]> Matrix = Wczytaj(lines);
- List<String[]> MatrixofTypes = Wczytaj(Linestypes);
- Console.WriteLine("Tablica elementow");
- foreach (var item in Matrix)
- {
- Console.WriteLine(string.Join(' ',item));
- }
- Console.WriteLine("Tablica typow");
- foreach (var item in MatrixofTypes)
- {
- Console.WriteLine(string.Join(' ', item));
- }
- Console.ReadKey();
- }
- public static List<String []> Wczytaj( string [] path)
- {
- List<String[]> Tmp = new List<String[]>();
- for (int i = 0; i < path.Length; i++)
- {
- string[] element;
- element = path[i].Split(' ');
- Tmp.Add(element);
- }
- return Tmp;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement