Advertisement
GrandtherAzaMarks

SplitAnalog

Feb 6th, 2018
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.25 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.  
  7. namespace MeyhodsPrepearing
  8. {
  9.     class Program
  10.     {
  11.         public static void SplitAnalog(string str, ref char[] CharArray, ref int i, ref string[] strarr)
  12.         {
  13.             char[] temp = new char[str.Length];
  14.             for (i = 0; i < str.Length; i++)
  15.                 CharArray[i] = str[i];
  16.  
  17.             for (i = 0; i < str.Length; i++)
  18.             {
  19.                 while (CharArray[i] != ' ' || CharArray[i] != ',' || CharArray[i] != ';')
  20.                 {
  21.                     temp[i] = CharArray[i];
  22.                 }
  23.                 strarr[i] = temp.ToString();
  24.             }
  25.         }
  26.  
  27.         static void Main(string[] args)
  28.         {
  29.             char k = ' ';
  30.             string str;
  31.             string[] strarr;
  32.             char[] CharArray;
  33.             int i = 0;
  34.             do
  35.             {
  36.                 str = Console.ReadLine();
  37.                 CharArray = new char[str.Length];
  38.                 strarr = str.Split(' ');
  39.                 SplitAnalog(str, ref CharArray, ref i, ref strarr);
  40.  
  41.                 k = Convert.ToChar(Console.ReadLine());
  42.             } while (k == 'y');
  43.         }
  44.     }
  45. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement