Advertisement
radidim

Split.Select (C# Shell App Paste)

Oct 9th, 2018
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.66 KB | None | 0 0
  1. using System;
  2. using System.IO;
  3. using System.Linq;
  4. using System.Collections.Generic;
  5.  
  6. namespace CSharp_Shell
  7. {
  8.  
  9.     public static class Program
  10.     {
  11.         public static void Main()
  12.         {
  13.            int[] input = Console.ReadLine()
  14.            .Split('.')
  15.            .Select(int.Parse)
  16.            .ToArray();
  17.            int length = input.Length;
  18.            for(int i=0;i<length;i++){
  19.            Console.WriteLine(input[i]);}
  20.            string[] text = {Console.ReadLine().ToString()};
  21.            //.Split('.')
  22.            //.Select(int.Parse)
  23.            //.ToArray();
  24.            for(int i=0;i<length;i++){
  25.            Console.Write(text[i]);}
  26.            
  27.         }
  28.     }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement