Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading;
- namespace @for
- {
- class Program
- {
- static void Main(string[] args)
- {
- while (true)
- {
- Console.Clear();
- Random rand = new Random();
- #region első for ciklus
- for (int i = 0; i < 10; i++)
- {
- Console.Clear();
- Console.SetCursorPosition(i, 0);
- Console.Write('*');
- Thread.Sleep(40);
- }
- #endregion
- #region második for ciklus
- for (int i = 0; i < 6; i++)
- {
- Console.Clear();
- Console.SetCursorPosition(10, i);
- Console.Write('*');
- Thread.Sleep(40);
- }
- #endregion
- #region harmadik for ciklus
- for (int i = 10; i > 0; i--)
- {
- Console.Clear();
- Console.SetCursorPosition(i, 6);
- Console.Write('*');
- Thread.Sleep(40);
- }
- #endregion
- #region negyedik for ciklus
- for (int i = 6; i > 0; i--)
- {
- Console.Clear();
- Console.SetCursorPosition(0, i);
- Console.Write('*');
- Thread.Sleep(40);
- }
- #endregion
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement