SHARE
TWEET

Untitled

a guest Nov 21st, 2019 83 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System;
  2. using System.Collections;
  3. using System.Collections.Generic;
  4. using System.IO;
  5. using System.Linq;
  6. using System.Text;
  7. using System.Threading.Tasks;
  8.  
  9. namespace ConsoleApp1
  10. {
  11.     class Program
  12.     {
  13.         static void Main(string[] args)
  14.         {
  15.             var text = File.ReadAllLines("C:\\Users\\s0159399\\Downloads\\german.data");
  16.             String[][] outout = new String[20][];
  17.             for (int i = 0; i < outout.Length; i++)
  18.             {
  19.                 outout[i] = new String[text.Length];
  20.                 for (int j = 0; j < text.Length; j++)
  21.                 {
  22.                     outout[i][j] = string.Empty;
  23.                 }
  24.             }
  25.             int[] sizes = { 4, 0, 5, 11, 0, 5, 5, 0, 5, 3, 0, 4, 0, 3, 3, 0, 4, 0, 2, 2 };
  26.             int[] deltas = { 1, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 1 };
  27.  
  28.             for (int i = 0; i < text.Length; i++)
  29.             {
  30.                 String[] splitArray = text[i].Split(' ');
  31.                 splitArray = Array.Resize(ref splitArray, splitArray.Length - 1);
  32.                 for (int j = 0; j < splitArray.Length; j++)
  33.                 {
  34.                     if (sizes[j] == 0)
  35.                     {
  36.                         outout[i][j].Insert(outout[i][j].Length, splitArray[j]);
  37.                     }
  38.                 }
  39.  
  40.  
  41.  
  42.             }
  43.         }
  44.     }
  45. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top