Advertisement
Guest User

Untitled

a guest
Jan 12th, 2016
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.48 KB | None | 0 0
  1. using System;
  2.  
  3.  
  4. class Program
  5. {
  6. static void Main()
  7. {
  8. int size = int.Parse(Console.ReadLine());
  9. int spaces = (size - 1) / 2;
  10. int forTop = size + 1;
  11. int neckSpaces = (size + 1) - 2;
  12. int heightNeck = (size + 1) / 2;
  13. int cone = (size - 3) / 2;
  14.  
  15. string topSpaces = new string(' ', spaces);
  16. string top = new string('*', forTop);
  17. string neck = new string(' ', neckSpaces);
  18. Console.WriteLine(topSpaces + top + topSpaces);
  19.  
  20. for (int h = 0; h < heightNeck; h++)
  21. {
  22. Console.WriteLine(topSpaces + "*" + neck + "*" + topSpaces);
  23. }
  24.  
  25. for (int c = 1; c <= cone; c++)
  26. {
  27.  
  28. int spaceIn = (size - 1 + c * 2);
  29. int spaceOut = (((size - 1) / 2) - c);
  30. string spacesIn = new string(' ', spaceIn);
  31. string spacesOut = new string(' ', spaceOut);
  32.  
  33. Console.WriteLine(spacesOut + "*" + spacesIn + "*" + spacesOut);
  34. }
  35.  
  36. //bubbles
  37. for (int f = 0; f < size; f++)
  38. {
  39. string froath = new string('.', (size - 1) * 2);
  40. Console.WriteLine("*" + froath + "*");
  41. }
  42. //beer
  43. for (int b = 0; b < size; b++)
  44. {
  45. string beer = new string('@', (size - 1) * 2);
  46. Console.WriteLine("*" + beer + "*");
  47. }
  48.  
  49. string bottom = new string('*', size * 2);
  50. Console.WriteLine(bottom);
  51. }
  52. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement