Skip to content

Instantly share code, notes, and snippets.

@Sprite105
Created November 26, 2015 20:26
Show Gist options
  • Save Sprite105/b2611d82ca03143f7e8c to your computer and use it in GitHub Desktop.
Save Sprite105/b2611d82ca03143f7e8c to your computer and use it in GitHub Desktop.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace graph
{
class Class1
{
private string[] split;
public void set() {
Console.Write("Enter mas of number --> ");
string s = Console.ReadLine();
split = s.Split(new Char[] { ' ' });
print();
}
private void print() {
Console.BackgroundColor = ConsoleColor.Cyan;
Console.ForegroundColor = ConsoleColor.White;
Console.WriteLine();
for (int i = 0; i < split.Length; i++ ) {
for (int j = 1; j < Convert.ToInt32(split[i])+1; j++) {
Console.Write("|");
} Console.WriteLine();
}
Console.ResetColor();
Console.Read();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment