using System;
using System.Linq;
public class Test
{
public static void Main()
{
int[] myArray = {1,3,4,7,9,12,17,20,30,35};
Console.Write("请输入要插入的值:");
int f = int.Parse(Console.ReadLine());
myArray = myArray.Where(x => x < f).Concat(new int[] { f }).Concat(myArray.Where(x => x >= f)).ToArray();
Console.WriteLine("显示插入后的数组:");
foreach (int x in myArray)
Console.Write(x + " ");
}
}
dXNpbmcgU3lzdGVtOwp1c2luZyBTeXN0ZW0uTGlucTsKCnB1YmxpYyBjbGFzcyBUZXN0CnsKCXB1YmxpYyBzdGF0aWMgdm9pZCBNYWluKCkKCXsKCmludFtdIG15QXJyYXkgPSB7MSwzLDQsNyw5LDEyLDE3LDIwLDMwLDM1fTsKQ29uc29sZS5Xcml0ZSgi6K+36L6T5YWl6KaB5o+S5YWl55qE5YC877yaIik7CmludCBmID0gaW50LlBhcnNlKENvbnNvbGUuUmVhZExpbmUoKSk7Cm15QXJyYXkgPSBteUFycmF5LldoZXJlKHggPT4geCA8IGYpLkNvbmNhdChuZXcgaW50W10geyBmIH0pLkNvbmNhdChteUFycmF5LldoZXJlKHggPT4geCA+PSBmKSkuVG9BcnJheSgpOwpDb25zb2xlLldyaXRlTGluZSgi5pi+56S65o+S5YWl5ZCO55qE5pWw57uE77yaIik7CmZvcmVhY2ggKGludCB4IGluIG15QXJyYXkpCiAgICBDb25zb2xlLldyaXRlKHggKyAiICIpOwoKCX0KCn0=