Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace MemoryView
- {
- class Program
- {
- static void Main(string[] args)
- {
- string inputFromConsole = string.Empty;
- string[] inputDataArray = new string[0];
- while ((inputFromConsole = Console.ReadLine()) != "Visual Studio crash")
- {
- inputDataArray = AddToArraySplit(inputDataArray, inputFromConsole, ' ');
- }
- for (int i = 0; i < inputDataArray.Length; i++)
- {
- if (inputDataArray[i] == "32763")
- {
- int a = int.Parse(inputDataArray[i + 2]) + i + 4;
- for (int charsCount = i + 4; charsCount <= a; charsCount++)
- {
- int numeric = int.Parse(inputDataArray[charsCount]);
- char characters = (char)numeric;
- Console.Write(characters);
- }
- Console.WriteLine();
- }
- }
- }
- static string[] AddToArraySplit(string[] inputArray, string inputString, char separator)
- {
- int stringCount = 0;
- while (inputString[stringCount] == separator)
- {
- stringCount++;
- if (stringCount == inputString.Length)
- {
- break;
- }
- }
- string[] newArray = new string[1];
- int indexOfArray = 0;
- for (; stringCount < inputString.Length; stringCount++)
- {
- int newStringCount = 0;
- if (inputString[stringCount] != separator)
- {
- newArray[indexOfArray] += inputString[stringCount].ToString();
- }
- else
- {
- int newCount = stringCount;
- while (inputString[newCount] == separator)
- {
- newCount++;
- if (newCount == inputString.Length)
- {
- stringCount = newCount;
- break;
- }
- }
- indexOfArray++;
- Array.Resize<string>(ref newArray, indexOfArray + 1);
- }
- }
- int startIndexCount = inputArray.Length;
- int endOfIndex = inputArray.Length + newArray.Length;
- indexOfArray = 0;
- Array.Resize<string>(ref inputArray, inputArray.Length + newArray.Length);
- for (;startIndexCount < endOfIndex ; startIndexCount++)
- {
- inputArray[startIndexCount] += newArray[indexOfArray++];
- }
- return inputArray;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement