Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- NAKOV //////////////////////////////////////////////////////////////////////////////
- int n = int.Parse(Console.ReadLine());
- for (int i = n; i >= 1; i -=2)
- {
- string asteriks = new string('*',i);
- string dashes = new string('-',(n-i) /2);
- Console.WriteLine("{0}{1}{0}", dashes, asteriks);
- }
- for (int i = 3; i <= n; i += 2)
- {
- string asteriks = new string('*', i);
- string dashes = new string('-', (n - i) / 2);
- Console.WriteLine("{0}{1}{0}", dashes, asteriks);
- }
- 1 Sun GLASSES ////////////////////////////////////////////////////////////////////////////////
- int n = int.Parse(Console.ReadLine());
- //top
- Console.WriteLine("{0}{1}{0}", new string('*', n * 2), new string(' ', n));
- //middle
- for (int i = 0; i < n-2; i++)
- {
- Console.Write('*');
- Console.Write(new string('/', n*2 -2 ));
- Console.Write('*');
- Console.WriteLine("{0}{1}{2}{1}{0}", new string('*', 1), new string ('/',n*2-2),new string(' ',n));
- if (i == n/2-1)
- {
- Console.Write(new string('|',n));
- }
- else
- {
- Console.Write(new string(' ',n));
- }
- Console.Write('*');
- Console.Write(new string('/', n * 2 - 2));
- Console.Write('*');
- Console.WriteLine();
- }
- //bottom
- Console.WriteLine("{0}{1}{0}", new string('*', n * 2), new string(' ', n));
- 3 EXPLORER _ DIAMOND /////////////////////////////////////////////////////////
- int n = int.Parse(Console.ReadLine());
- int outd = n / 2;
- int innd = 1;
- //top
- Console.WriteLine("{0}*{0}", new string('-', n / 2));
- //mid
- for (int i = 0; i < n / 2; i++)
- {
- outd--;
- string kondio = new string('-', outd);
- string doko = new string('-', innd);
- Console.WriteLine("{0}*{1}*{0}", kondio, doko);
- innd += 2;
- }
- //second haff mid
- innd = n - 4;
- outd = 0;
- for (int i = 0; i < n / 2-1; i++)
- {
- outd++;
- string kondio = new string('-', outd);
- string doko = new string('-', innd);
- Console.WriteLine("{0}*{1}*{0}", kondio, doko);
- innd -= 2;
- }
- Console.WriteLine("{0}*{0}", new string('-', n / 2));
- 4 NEW HOUSE //////////////////////////////////////////////////////////////
- int n = int.Parse(Console.ReadLine());
- int inner = 1;
- outdots = n / 2;
- //int outdots = n /2;
- for (int i = 0 ; i <= n/2; i++)
- {
- outdots--;
- Console.WriteLine("{0}{1}{0}", new string('.', outdots), new string('#', inner));
- inner += 2;
- }
- for (int j = 0; j < n; j++)
- {
- Console.WriteLine("{0}{1}{0}","_",new string('*',n-2));
- }
- 5 HOUSE INNER ANS OUTER DOTS //////////////////////////////////////////////////////////
- int n = int.Parse(Console.ReadLine());
- int innd = 1;
- int outd = n / 2;
- Console.WriteLine("{0}*{0}", new string('.', n / 2));
- for (int i = 0; i < n/2 -1; i++)
- {
- outd--;
- string inner = new string('.', innd);
- string outer = new string('.', outd);
- Console.WriteLine("{0}*{1}*{0}", outer, inner);
- innd += 2;
- }
- Console.WriteLine("{0}", new string('*', n));
- //dolnata 4ast na kushtata
- int wallDistance = n / 4;
- for (int i = 0; i < n / 2 - 1; i++)
- {
- Console.WriteLine("{0}{1}{2}{1}{0}", new string('.', wallDistance),new string('*', 1), new string('.', n - 2 * wallDistance - 2));
- }
- //bottom
- Console.WriteLine("{0}{1}{2}{1}{0}", new string('.', wallDistance),new string('*', 1), new string('*', n - 2 * wallDistance - 2));
- 6 ARROW ////////////////////////////////////////////////////////////////////////////////////////////////
- int n = int.Parse(Console.ReadLine());
- int innd = (2*n)-5;
- int outd = 1;
- Console.WriteLine("{0}{1}{0}", new string('.', n / 2), new string('#', n));
- //top
- for (int i = 0; i < n - 2; i++)
- {
- Console.WriteLine("{0}#{1}#{0}", new string('.', n/2),new string('.', n-2));
- }
- Console.WriteLine("{0}{1}{0}", new string('#', n / 2 + 1), new string('.', n -2));
- // bottom
- for (int i = 0; i < n-2; i++)
- {
- string inner = new string('.', innd);
- string outer = new string('.', outd);
- Console.WriteLine("{0}#{1}#{0}", outer, inner);
- outd++;
- innd -= 2;
- }
- Console.WriteLine("{0}#{0}", new string('.', n - 1));
- }
- 7 WINE GLASS chasha za vino //////////////////////////////////////////////////////////////////////////////
- int n = int.Parse(Console.ReadLine());
- int borderSpacing = 0;
- int middleSpacing = n - 2;
- //top na chashata
- for (int i = 0; i < n / 2 - 1; i++)
- {
- string dots = new string('.', borderSpacing);
- string asterisks = new string('*', middleSpacing);
- Console.WriteLine("{0}\\{1}/{0}", dots, asterisks);
- borderSpacing++;
- middleSpacing -= 2;
- }
- Console.WriteLine("{0}\\/{0}", new string('.', n/2-1));
- // mid drujkata
- if (n >= 12)
- {
- for (int i = 0; i < n/2-2; i++)
- {
- Console.WriteLine("{0}||{0}", new string('.', n / 2 - 1));
- }
- }
- else if (n < 12)
- {
- for (int i = 0; i < n / 2 - 1; i++)
- {
- Console.WriteLine("{0}||{0}", new string('.', n / 2 - 1));
- }
- }
- // bottom osnovata
- if (n >= 12)
- {
- Console.WriteLine("{0}", new string('-', n));
- Console.WriteLine("{0}", new string('-', n));
- }
- else if (n < 12)
- {
- Console.WriteLine("{0}", new string('-', n));
- }
- 8 PROGRAMER DNA ////////////////////////////////////////////////////////////////////////////////
- int n = int.Parse(Console.ReadLine());
- int rowLenght = 7;
- char startingLetter = (char)Console.Read();
- int dots = rowLenght / 2;
- int dotsCount = 1;
- for (int i = 0; i < n; i++)
- {
- Console.Write(new string('.', dots));
- // pechatame gornata 4ast na to4kite
- for (int j = 0; j < rowLenght - 2 * dots; j++)// pechati lettera/bukvata tolkova puti kolkoto trqbva da se vurti for cikula v purvoto zavurtane e 1 zashtoto e 7 - dots/3 * 2 pri vtoroto 3 puti zashtoto 7 - 2 * 2 = 3
- {
- // pechatame bukvite
- Console.Write(startingLetter);
- startingLetter++;
- if (startingLetter == 'H')
- {
- startingLetter = 'A';
- }
- }
- // pechatame dolata 4ast na bukvite
- Console.WriteLine(new string('.', dots));
- dots = dots - dotsCount; // vadim ot dots - 1 za da namalim to4kite // dotsCount = 1
- if (dots == -1) // ako dots mi stane -1 vliza v if i mi go promenq na 1
- {
- dots = 1;
- dotsCount = dotsCount * -1;
- // pravi go 1 * -1 za da naprvi dotsCount na -1 sled tova umnojava -1 * -1 = 1 i subira s 1 + 1 za da stane 2 i uvelichava
- }
- else if (dots == rowLenght / 2 + 1)
- // ako dots stanat 4 to vlez v cikula i gi napravi pak da sa 3 i mi gi namalqi s po 1
- {
- dots = rowLenght / 2;
- dotsCount = dotsCount * -1;
- }
- KONDIO Dna primer ot porgramer dna //////////////////////////////////////////
- nt n = int.Parse(Console.ReadLine());
- int rowLenght = 7;
- int kondio = 1;
- int doko = 2;
- int dots = rowLenght / 2;
- int dotsCount = 1;
- for (int i = 0; i < n; i++)
- {
- // pechatame dolata 4ast na bukvite
- Console.WriteLine("{0}{1}{0}", new string('.', dots), new string('#', kondio), new string('.', dots));
- kondio = kondio + doko;
- if (kondio == 9)
- {
- kondio = 5;
- doko = doko * -1;
- }
- if (kondio == -1) // ako dots mi stane -1 vliza v if i mi go promenq na 1
- {
- kondio = 1;
- doko = doko * -1;
- // pravi go 1 * -1 za da naprvi dotsCount na -1 sled tova umnojava -1 * -1 = 1 i subira s 1 + 1 za da stane 2 i uvelichava
- }
- ///////////////////////////////////////////////////////////// po4vat dots
- dots = dots - dotsCount; // vadim ot dots - 1 za da namalim to4kite // dotsCount = 1
- if (dots == -1) // ako dots mi stane -1 vliza v if i mi go promenq na 1
- {
- dots = 1;
- dotsCount = dotsCount * -1;
- // pravi go 1 * -1 za da naprvi dotsCount na -1 sled tova umnojava -1 * -1 = 1 i subira s 1 + 1 za da stane 2 i uvelichava
- }
- else if (dots == rowLenght / 2 + 1)
- // ako dots stanat 4 to vlez v cikula i gi napravi pak da sa 3 i mi gi namalqi s po 1
- {
- dots = rowLenght / 2;
- dotsCount = dotsCount * -1;
- }
- 28 april DISK /////////////////////////////////////////////////////////////////////////////////////////////////////
- int n = int.Parse(Console.ReadLine());
- int r = int.Parse(Console.ReadLine());
- int centerX = n / 2;////////// delim na 2 za da zapo4va da pechati ot centura na poleto ot '*'
- int centerY = n / 2;/////////
- for (int i = 0; i < n; i++)
- {
- for (int k = 0; k < n; k++)
- {
- int distY = Math.Abs(centerY - i);
- int distX = Math.Abs(centerX - k);
- double distanceToCenter = Math.Sqrt(distX * distX + distY * distY);
- if (distanceToCenter <= r)
- {
- Console.Write("*");
- }
- else
- {
- Console.Write(".");
- }
- }
- Console.WriteLine();
- }
- 25 july morning SCOTLAD FLAG ///////////////////////////////////////////////////////////////////////////
- /////////////////// prefikstato reshenie 90 to4ki
- char currChar = 'A';
- int n = int.Parse(Console.ReadLine());
- // Console.WriteLine(currChar++ + new string('#', n - 2) + currChar++);// nai-gorniqt statichen red na koito obache nqma da se uvelichava char currChar++
- if (currChar == 'Z') // '['
- currChar = 'A';
- Console.Write(currChar);
- Console.Write(new string('#', n - 2));
- Console.Write(++currChar);
- Console.WriteLine();
- for (int i = 1; i <= n/2-1; i++)
- {
- Console.Write(new string('~', i));
- if (currChar == 'Z') // '['
- currChar = '@';
- Console.Write(++currChar);
- Console.Write(new string('#', n - 2 - 2 * i));
- if (currChar == 'Z')
- currChar = '@';
- Console.Write(++currChar);
- Console.WriteLine(new string('~', i));
- }
- Console.Write(new string('-', n/2));
- if (currChar == 'Z') // '['
- currChar = '@';
- Console.Write(++currChar);
- Console.WriteLine(new string('-', n / 2));
- for (int i = n/2-1; i >= 1; i--)
- {
- Console.Write(new string('~', i));
- if (currChar == 'Z') // '['
- currChar = 'A';
- Console.Write(++currChar);
- Console.Write(new string('#', n - 2 - 2 * i));
- if (currChar == 'Z' )
- currChar = '@';
- Console.Write(++currChar);
- Console.WriteLine(new string('~', i));
- }
- if (currChar == 'Z' + 1) // '['
- currChar = '@';
- Console.Write(++currChar);
- Console.Write(new string('#', n - 2));
- Console.Write(++currChar);
- Console.WriteLine();
- }
- }
- SCOTLAND FLAG 2ro reshenie za 100 to4ki ////////////////////////////////////////////////////////////////////////////////////
- char currChar = 'A';
- int n = int.Parse(Console.ReadLine());
- for(int i=0; i<=n/2-1;i++)
- {
- Console.Write(new string('~',i));
- if (currChar == '[')
- {
- currChar = 'A';
- }
- Console.Write(currChar++);
- Console.Write(new string('#', n - 2 - 2 * i));
- if (currChar == '[')
- {
- currChar = 'A';
- }
- Console.Write(currChar++);
- Console.WriteLine(new string('~', i));
- }
- Console.Write(new string('-',n/2));
- if (currChar == '[')
- {
- currChar = 'A';
- }
- Console.Write(currChar++);
- Console.WriteLine(new string('-', n / 2));
- for (int i = n/2-1; i >= 0; i--)
- {
- Console.Write(new string('~', i));
- if (currChar == '[')
- {
- currChar = 'A';
- }
- Console.Write(currChar++);
- Console.Write(new string('#', n - 2 - 2 * i));
- if (currChar == '[')
- {
- currChar = 'A';
- }
- Console.Write(currChar++);
- Console.WriteLine(new string('~', i));
- }
- 25 july evening house with window ////////////////////////////////////////////////////////////////////////////////////
- int n = int.Parse(Console.ReadLine());
- int outdots = n - 1;
- int middots = 1;
- Console.Write("{0}*{0}", new string ('.',outdots));
- Console.WriteLine();
- for (int i = 0 ; i < n-1 ; i++)
- {
- outdots--;
- string newoutdots = new string('.', outdots);
- string newmiddots = new string('.', middots);
- Console.WriteLine("{0}*{1}*{0}", newoutdots , newmiddots);
- // outdots -= 1;
- middots += 2;
- }
- Console.WriteLine(new string('*', n * 2 -1));
- for (int j = 0; j <= n / 4 -1; j++)
- {
- string oouterrdott = new string('.', (2 * n - 1)-2);
- Console.WriteLine("*{0}*", oouterrdott);
- }
- for (int h = 0; h <= n / 2 -1 ; h++)
- {
- string outwindow = new string('.', n / 2);
- string window = new string('*', n - 3);
- Console.WriteLine("*{0}{1}{0}*", outwindow, window);
- }
- for (int k = 0; k <= n / 4 - 1; k++)
- {
- string oouterrdott = new string('.', (2 * n - 1) - 2);
- Console.WriteLine("*{0}*", oouterrdott);
- }
- Console.WriteLine(new string('*', n * 2 - 1));
- 22 avgust CAR ////////////////////////////////////////////////////////////////////////////////
- int n = int.Parse(Console.ReadLine());
- int inner = n;
- int outer = n;
- Console.WriteLine("{0}{1}{0}", new string('.', n), new string('*', n));
- //top
- for (int i = 0; i < n / 2 -1; i++)
- {
- outer--;
- Console.WriteLine("{0}*{1}*{0}", new string('.', outer), new string('.', inner));
- inner += 2;
- }
- Console.WriteLine("{0}{1}{0}", new string('*', n / 2 + 1), new string('.', n * 2 -2));
- //mid
- for (int i = 0; i < n / 2 - 2; i++)
- {
- Console.WriteLine("*{0}*", new string('.', n * 3 -2));
- }
- Console.WriteLine("{0}", new string('*', n * 3));
- //bot
- for (int i = 0; i < n / 2 - 2; i++)
- {
- Console.WriteLine("{0}*{1}*{2}*{1}*{0}", new string('.', n /2),new string('.', n /2 -1),new string('.', n -2));
- }
- Console.WriteLine("{0}*{1}*{2}*{1}*{0}", new string('.', n / 2), new string('*', n / 2 -1), new string('.', n - 2));
- 26 avgust STAR ///////////////////////////////////////////////////////////////////////////////////
- int n = int.Parse(Console.ReadLine());
- int outdots = n;
- int inndots = 1;
- int stars= n / 2 + 1;
- // top
- Console.WriteLine("{0}*{0}", new string('.', n));
- for (int i = 0; i < n / 2 -1 ; i++)
- {
- outdots--;
- string outd = new string('.', outdots);
- string innd = new string('.', inndots);
- Console.WriteLine("{0}*{1}*{0}", outd , innd);
- inndots += 2;
- }
- //mid
- Console.WriteLine("{0}{1}{0}", new string ('*', n / 2 + 1), new string ('.', n-1));
- outdots = 1; // ak beshe 0 to operatora za uvelichavene ++ trqbvashe da e predi Console.WriteLine
- inndots = n * 2 -3;
- for (int i = 0; i < n / 2 - 1; i++)
- {
- // outdots++; ako outdots mi beshe 0
- string outd = new string('.', outdots);
- string innd = new string('.', inndots);
- Console.WriteLine("{0}*{1}*{0}", outd, innd);
- outdots++;
- inndots -= 2;
- }
- Console.WriteLine("{0}*{1}*{1}*{0}", new string('.', n / 2), new string('.', n /2 - 1));
- //bot
- outdots = n / 2;
- inndots = 1;
- for (int i = 0; i < n /2 -1; i++)
- {
- outdots--;
- string outd = new string('.', outdots);
- string innd = new string('.', inndots);
- Console.WriteLine("{0}*{1}*{2}*{1}*{0}", outd, new string('.', n / 2 -1), innd);
- inndots += 2;
- }
- Console.WriteLine("{0}{1}{0}", new string('*', n / 2 + 1), new string('.', n - 1));
- 7 noemvri PLANE //////////////////////////////////////////////////////////////
- int n = int.Parse(Console.ReadLine());
- int outdots = n;
- int middots = 1;
- Console.Write("{0}*{0}", new string('.', (n*2)-(n/2+1)));
- Console.WriteLine();
- int doko = n;
- int kondio = 1;
- for (int i = 0 ; i < n / 2 + 1; i++)
- {
- doko--;
- string newoutdots = new string('.', doko + (doko/2));
- string newmiddots = new string('.', kondio);
- Console.WriteLine("{0}*{1}*{0}", newoutdots, newmiddots);
- // outdots -= 1;
- kondio +=2;
- }
- outdots = n;
- middots = n;
- for (int i = 0; i < n / 2; i++)
- {
- outdots -= 2;
- string newoutdots = new string('.', outdots);
- string newmiddots = new string('.', middots + 2);
- Console.WriteLine("{0}*{1}*{0}", newoutdots, newmiddots);
- // outdots -= 1;
- middots += 4;
- }
- Console.WriteLine("*{0}*{1}*{0}*", new string('.', n - 2), new string('.', n));
- outdots = n - 4;
- middots = 1;
- for (int i = 0; i < n / 2 - 1; i++)
- {
- Console.WriteLine("*{0}*{1}*{2}*{1}*{0}*", new string('.', outdots), new string('.', middots), new string('.', n));
- outdots -= 2;
- middots += 2;
- }
- outdots = n - 1;
- middots = n;
- for (int i = 0; i <= n - 2; i++)
- {
- Console.WriteLine("{0}*{1}*{0}", new string('.', outdots), new string('.', middots));
- outdots -= 1;
- middots += 2;
- }
- Console.WriteLine(new string('*', n * 3))
- 8 noemvri ROKLQ ////////////////////////////////////////////////////////////////////////////////
- int n = int.Parse(Console.ReadLine());
- int outdots = n;
- int middots = n;
- int star = n;
- // statichen
- Console.Write("{0}{1}{0}", new string('.', outdots), new string('*', star));
- Console.WriteLine();
- // top
- for (int i = 0; i < n / 2; i++)
- {
- outdots -= 2;
- Console.WriteLine("{0}*{1}*{0}", new string('.', outdots), new string('.', middots + 2));
- middots += 4;
- }
- //statichen
- Console.WriteLine("*{0}*{1}*{0}*", new string('.', n - 2), new string('.', n));
- //mid
- outdots = n - 4;
- middots = 1;
- for (int i = 0; i < n / 2 - 1; i++)
- {
- Console.WriteLine("*{0}*{1}*{2}*{1}*{0}*", new string('.', outdots), new string('.', middots), new string('.', n));
- middots += 2;
- outdots -= 2;
- }
- //bot
- outdots = n - 1;
- middots = n;
- for (int i = 0; i <= n - 2; i++)
- {
- Console.WriteLine("{0}*{1}*{0}", new string('.', outdots), new string('.', middots));
- outdots--;
- middots += 2;
- }
- //statichen
- Console.WriteLine(new string('*', n * 3));
- 19 DEKEMVRI HEADPHONES- slushalki ////////////////////////////////////////////////////////////////////////
- int n = int.Parse(Console.ReadLine());
- int asteriks = 1;
- int dots = n / 2 +1;
- Console.WriteLine("{0}{1}{0}", new string('-', n / 2), new string('*', n + 2));
- for (int i = 0; i < n - 1; i++)
- {
- Console.WriteLine("{0}*{1}*{0}", new string('-', n / 2), new string('-', n));
- }
- for (int j = 0; j < n / 2 + 1; j++)
- {
- dots--;
- Console.WriteLine("{0}{1}{0}{2}{0}{1}{0}", new string('-', dots), new string('*', asteriks), new string('-',1));
- asteriks += 2;
- }
- asteriks = n-2;
- dots = 1;
- for (int k = 0; k < n / 2; k++)
- {
- Console.WriteLine("{0}{1}{0}{2}{0}{1}{0}", new string('-', dots), new string('*', asteriks),new string('-', 1));
- dots++;
- asteriks -= 2;
- }
- 20 Dekemvri LODKA - boat /////////////////////////////////////////////////////////////////////////////////////////
- // LODKA
- int n = int.Parse(Console.ReadLine());
- //top first haff
- int sailCurrentW = 1;
- int ppp = n-1;
- for (int i = 0; i < n/2 +1; i++)
- {
- //Console.Write("{0}",new string('.',ppp ));
- //Console.Write("{0}",new string('*', sailCurrentW));
- //Console.WriteLine("{0}",new string('.', n));
- Console.WriteLine("{0}{1}{2}", new string('.', ppp), new string('*', sailCurrentW), new string('.', n));
- ppp -=2;
- sailCurrentW += 2;
- }
- // bot second haff
- int inner = n - 2;
- int outer = 2;
- for (int i = 0; i < n / 2; i++)
- {
- //Console.Write("{0}", new string('.', outer));
- //Console.Write("{0}", new string('*', inner));
- //Console.WriteLine("{0}", new string('.', n));
- Console.WriteLine("{0}{1}{2}", new string('.', ppp), new string('*', sailCurrentW), new string('.', n));
- outer += 2;
- inner -= 2;
- }
- //bot
- int boatHeight = n / 2;
- int boatWidth = n + n;
- int dots = 0;
- for (int i = 0; i < boatHeight; i++)
- {
- Console.Write("{0}", new string('.', dots));
- Console.Write("{0}", new string('*', boatWidth));
- Console.WriteLine("{0}", new string('.', dots));
- boatWidth -= 2;
- dots++;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement