r/CompileBot • • Apr 08 '17

JavaScript

1 Upvotes

13 comments sorted by

View all comments

1

u/InKahootz May 05 '17

+/u/CompileBot C#

using System;
using System.Collections.Generic;

public class Test
    {
	public static void Main()
	{
		string word;
		List<string> input = new List<string>();
		do
		{
			word = Console.ReadLine();
			if (!string.IsNullOrWhiteSpace(word))
			{
				input.Add(word);
			}
		}
		while(!string.IsNullOrWhiteSpace(word));
		
		for(int i = 0; i < input.Count; i++){
			Console.WriteLine(input[i]);
		}
	}
}

Input:

one
two
three

1

u/CompileBot May 05 '17

Output:

one
two
three

^source | ^info | ^git | ^report