Created
March 27, 2015 20:34
-
-
Save deathbymanga/d1ec380b870c9d700eb0 to your computer and use it in GitHub Desktop.
code
This file contains 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; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace ConsoleApplication6 | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
int y = 0; | |
string ys = ""; | |
int count = 0; | |
List<int> grArrList= new List<int>(); | |
for (int j = 0; j < 1; ) | |
{ | |
Console.WriteLine("type numbers when you(0-9). When you feel done, type nothing"); | |
ys = Console.ReadLine(); | |
if (ys == "") | |
{ | |
j = 1; | |
} | |
else | |
{ | |
y = int.Parse(ys); | |
grArrList.Add(y); | |
count++; | |
} | |
} | |
Console.WriteLine(" "); | |
Console.Write(" "); | |
foreach (int element in grArrList) | |
{ | |
Console.Write("|" + element + "|"); | |
} | |
Console.WriteLine(" "); | |
Console.WriteLine(" "); | |
int n = 0; | |
int g = 0; | |
while (g < 1) | |
{ | |
while (n < count) | |
{ | |
Console.Write(n + "|"); | |
foreach (int element in grArrList) | |
{ | |
if(grArrList[n] == 0){ | |
Console.Write("|*|"); | |
} else if(grArrList[n] == 1) { | |
Console.Write("|*|"); | |
} else if(grArrList[n] == 2) { | |
Console.Write("|*|"); | |
} else if(grArrList[n] == 3) { | |
Console.Write("|*|"); | |
} else if(grArrList[n] == 4) { | |
Console.Write("|*|"); | |
} else if(grArrList[n] == 5) { | |
Console.Write("|*|"); | |
} else if(grArrList[n] == 6) { | |
Console.Write("|*|"); | |
} else if(grArrList[n] == 7) { | |
Console.Write("|*|"); | |
} else if(grArrList[n] == 8) { | |
Console.Write("|*|"); | |
} else if(grArrList[n] == 9) { | |
Console.Write("|*|"); | |
} | |
} | |
n++; | |
Console.WriteLine(); | |
} | |
if (n == count || n > count) | |
{ | |
g = 1; | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment