Console.WriteLine("请输入年龄");
stringstrage = Console.ReadLine();
int age = Convert.ToInt32(strage);
if(age >=18) { Console.WriteLine("可以查看");
elseif(age <10)
Console.WriteLine("不允许查看");
elseif(age >=10&& age <18) {
Console.WriteLine("是否继续查看");
stringan = Console.ReadLine();
if(an =="yes")
{ Console.WriteLine("请查看"); }
elseif(an =="no")
{ Console.WriteLine("退出,你放弃查看"); }
} Console.ReadKey(); }
}