2629881

Untitled

Jul 26th, 2018
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.72 KB | None | 0 0
  1. string defaultString = "A moving line";
  2.             int i = 0;
  3.             int a = 0;
  4.             while (true)
  5.             {
  6.                 if (i % 2 == 0 && a < 10)
  7.                 {
  8.                    
  9.                     WriteTextInPosition(defaultString, a);
  10.                     Thread.Sleep(50);
  11.                     a++;
  12.                    
  13.                 }
  14.                 if (a == 9)
  15.                     i++;
  16.                 if (a == 0 && i % 2 != 0)
  17.                     i--;
  18.  
  19.                 if (i % 2 != 0 && a > 0)
  20.                 {
  21.                     a--;
  22.                     WriteTextInPosition(defaultString, a);
  23.                     Thread.Sleep(50);
  24.                 }                
  25.             }
Advertisement
Add Comment
Please, Sign In to add comment