Skip to content

Instantly share code, notes, and snippets.

@bobixaka
bobixaka / Strange Numeral System
Created September 8, 2013 21:27
This is a strange numeral system which consists of 256 elements, represented by combinations of letters. 0 - 'A'; 1 - 'B'; ... 234 - "iA"; 235 - "iB"; ... 255 - "iV" The code converts a decimal (decimal based numeral system) to a Kaspichan Numeral system (strange system)
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace KaspichanNumbers
{
class KaspichanNumbers
{
@bobixaka
bobixaka / 3D cube
Created September 8, 2013 21:22
You are given a rectangular cuboid of size W (width), H (height) and D (depth) consisting of W * H * D cubes. The top row (layer) of the cube is considered to be with height 0. Each cube can contain one of the following things – slide, teleport, basket or just be an empty cube. A small ball that can fit through a single cube is dropped over the …
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Slides
{
class Slides
{
@bobixaka
bobixaka / Dictionary
Created August 28, 2013 21:24
Dictionary
using System;
using System.Collections.Generic;
using System.Text;
namespace Task_14_Dictionary
{
class Dictionary
{
static void Main()
{
@bobixaka
bobixaka / CensoredText
Created August 28, 2013 21:22
Hide specific words in a text. Make the forbidden words *******
// Example:
// Microsoft announced its next generation PHP compiler today.
// It is based on .NET Framework 4.0 and is implemented as a dynamic language in CLR.
// Words: "PHP, CLR, Microsoft"
// The expected result:
// ********* announced its next generation *** compiler today.
// It is based on .NET Framework 4.0 and is implemented as a dynamic language in ***.
using System;
using System.Collections.Generic;
@bobixaka
bobixaka / LargestAreaNeighbourElementsInMatrix
Created August 28, 2013 21:14
A program that finds the largest area of equal neighbor elements in a rectangular matrix and prints its size
using System;
namespace Task_7_LargestAreaNeighbour
{
class Program
{
static void Main()
{
//Ask for a size of the matrix
Console.Write("Please enter the matrix size: ");
@bobixaka
bobixaka / MathExpressionsCalculator
Created August 28, 2013 21:10
Calculate math expressions input from the console
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Threading;
namespace Task_7_MathExpressions
{
class MathExpressions
{
static void Main()
@bobixaka
bobixaka / TextEncryptor
Created August 28, 2013 21:08
Encrypt and decrypt any text
using System;
using System.Collections.Generic;
using System.Text;
namespace Task_7_Encryption
{
class Encryption
{
static void Main()
{
@bobixaka
bobixaka / EmailExtractor
Created August 28, 2013 21:06
How to extract e-mails from a text file with Regex (Regular expression)
using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
using System.Text.RegularExpressions;
namespace Task_18_E_MailExtract
{
class MailExtractor
{
@bobixaka
bobixaka / SpellNumbers
Created August 28, 2013 21:03
Convert any number in text. Spell the numbers.
using System;
using System.Globalization;
using System.Threading;
namespace Task_11_NumberTextConverter
{
class Number2TextConverter
{
static int Thousants;
static int Hundreds;
@bobixaka
bobixaka / AnyNumeralSystemConverter
Created August 28, 2013 21:00
Convert number from any numeral system to any other with base between 2 and 16
//Write a program to convert from any numeral system of given base s to any other numeral system of base d (2 ≤ s, d ≤ 16).
using System;
using System.Collections.Generic;
using System.Numerics;
namespace Task_7_AnySystemConverter
{
class Program
{