Advertisement
Guest User

for for for for

a guest
Aug 2nd, 2014
294
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.24 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace ConsoleApplication22
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. int n = int.Parse(Console.ReadLine());
  14. Console.WriteLine("{0}{1}{0}", new string('.', n - 1) , new string('*', 1)) ;
  15. int od = n - 2;
  16. int id = 1;
  17. for (int i = 1; i <= n - 1 ; i++ )
  18. {
  19. Console.WriteLine("{0}*{1}*{0}" , new string('.',od) , new string('.', id));
  20. od--;
  21. id += 2;
  22. }
  23. Console.WriteLine(new string('*', n * 2 -1));
  24. for (int i = 1; i <= n / 4; i++)
  25. {
  26. Console.WriteLine('*' + new string('.', n * 2 - 3) + '*');
  27. }
  28. for (int i =1; i <= n/2 ;i++)
  29. {
  30. Console.WriteLine("*{0}{1}{0}*", new string('.', n / 2), new string('*', n - 3));
  31. }
  32. for (int i = 1; i <= n / 4; i++)
  33. {
  34. Console.WriteLine('*' + new string('.', n * 2 - 3) + '*');
  35. }
  36.  
  37. Console.WriteLine(new string('*',n*2-1));
  38. }
  39. }
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement