Advertisement
Guest User

Untitled

a guest
Feb 12th, 2016
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. char znak;
  2. int x, y;
  3. Console.WriteLine("Podaj szerokosc: ");
  4. x = Convert.ToInt32(Console.ReadLine());
  5.  
  6. Console.WriteLine("Podaj wysokosc: ");
  7. y = Convert.ToInt32(Console.ReadLine());
  8.  
  9. Console.WriteLine("Podaj znak: ");
  10. znak = Convert.ToChar(Console.ReadLine());
  11. for (int i = 0; i < y; i++)
  12. {
  13. for (int j = 0; j < x; j++)
  14. {
  15. if (i == 0 || i == y - 1 || j == 0 || j == x - 1)
  16. Console.Write(znak);
  17. else Console.Write(" ");
  18. }
  19. Console.WriteLine();
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement