Console.Write("请输入一个100以内的整数:");
int shu =int.Parse(Console.ReadLine());
if (shu % 9 == 0)
Console.WriteLine("这是9的倍数");
if (shu / 10 == 9)
Console.WriteLine("他的十位是9");
if (shu % 10 == 9)
Console.WriteLine("他的个位是9");
if (shu % 9 == 1 && shu / 10 != 9 && shu % 10 != 9)
Console.WriteLine("这个数与9无关");
Console.ReadLine();
转载于:https://www.cnblogs.com/name-hanlin/p/4814107.html