c# console move string_c# params
阿里云国内75折 回扣 微信号:monov8 |
阿里云国际,腾讯云国际,低至75折。AWS 93折 免费开户实名账号 代冲值 优惠多多 微信号:monov8 飞机:@monov6 |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
Console.ForegroundColor = ConsoleColor.Yellow;
int m = 0;
int n = 0;
Console.Write("zxl");
do
{
switch (Console.ReadKey(true).Key)
{
case ConsoleKey.UpArrow:
n = n - 1;
break;
case ConsoleKey.DownArrow:
n = n + 1;
break;
case ConsoleKey.LeftArrow:
m = m - 1;
break;
case ConsoleKey.RightArrow:
m = m + 1;
break;
}
Console.Clear();
string aa = "";
string bb = "";
for (int a = 0; a < m; a++)
{
aa += " ";
}
for (int b = 0; b < n; b++)
{
bb += "\n";
}
Console.Write(bb + aa + "zxl");
}
while (true);
}
}
}
阿里云国内75折 回扣 微信号:monov8 |
阿里云国际,腾讯云国际,低至75折。AWS 93折 免费开户实名账号 代冲值 优惠多多 微信号:monov8 飞机:@monov6 |