Skip to content

Instantly share code, notes, and snippets.

@deathbymanga
Created March 27, 2015 20:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save deathbymanga/d1ec380b870c9d700eb0 to your computer and use it in GitHub Desktop.
Save deathbymanga/d1ec380b870c9d700eb0 to your computer and use it in GitHub Desktop.
code
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