Created
November 26, 2015 20:26
-
-
Save Sprite105/b2611d82ca03143f7e8c to your computer and use it in GitHub Desktop.
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.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