Advertisement
Temabowl

Untitled

Oct 18th, 2019
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.83 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using System.Windows;
  7. using System.IO;
  8. namespace ConsoleApplication1
  9. {
  10. class Program
  11. {
  12. static void Main(string[] args)
  13. {
  14. int[,] cities = new int[12, 12];
  15. string path = @"S:\EMA-18-2\Kasov\2\ConsoleApplication1\price.txt";
  16. try
  17. {
  18. Console.WriteLine("******считываем построчно********");
  19. using (StreamReader sr = new StreamReader(path, System.Text.Encoding.Default))
  20. {
  21. string line;
  22. while ((line = sr.ReadLine()) != snull)
  23. {
  24. {
  25. int town1 = 0;
  26. int town2 = 0;
  27. int price = 0;
  28. int count = 0;
  29.  
  30. string[] km = line.Split(new char[] { ' ' });
  31. foreach (string s in km)
  32. {
  33. Console.WriteLine(s);
  34.  
  35.  
  36. Console.WriteLine(km.Length);
  37. //Console.WriteLine(line);
  38. }
  39. }
  40.  
  41. }
  42.  
  43.  
  44. }
  45.  
  46. catch (Exception e)
  47. {
  48. Console.WriteLine(e.Message);
  49. }
  50.  
  51. int[,] array = new int[13, 13];
  52. for (int i = 0; i < 13; i++)//строка
  53. {
  54. for (int j = 0; j < 13; j++)//столбец
  55. {
  56. array[i, j] =
  57. }
  58. }
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74. Console.ReadLine();
  75. }
  76.  
  77.  
  78. }
  79. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement