Created
June 3, 2018 19:17
-
-
Save DaNooba/b5505a5fb4773e25b1f6828a9376cae6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace Space_iNator | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
while (true) | |
{ | |
Console.WriteLine("Insert text to space out here:"); | |
string input = Console.ReadLine(); | |
var i = 1; | |
foreach (char c in input) | |
{ | |
input = input.Insert(i, " "); | |
i = i + 2; | |
} | |
Console.WriteLine(input); | |
while (true) | |
{ | |
var exit = 0; | |
Console.WriteLine("Continue? y/n"); | |
string cont = Console.ReadLine(); | |
switch (cont) | |
{ | |
case "y": | |
exit = 1; | |
break; | |
case "n": | |
Environment.Exit(0); | |
break; | |
default: | |
Console.WriteLine("Please enter a valid command."); | |
break; | |
} | |
if(exit == 1) | |
{ | |
break; | |
} | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment