static void Main(string[] args)
{
while (true)
{
int x, y,p,a;
Random r = new Random();
x = r.Next(1, 10);//可以看成x为两位数,y为个位数,两位数x对10取余为a,y = r.Next(0, a);
a = r.Next(2, 10);
y = r.Next(1, a);
Console.WriteLine((x*1000+a*100) + "-" + (y*100) + "=" +((x*1000+a*100)-(y*100)));
Console.ReadLine();
}
}
时间: 2024-10-27 20:53:32