Console.WriteLine("请输入你的qq邮箱");
string yx = Console.ReadLine();
int a = yx.LastIndexOf("qq");
int b = yx.LastIndexOf("@");
if ((a - b) == 1)
{
Console.WriteLine("您输入的是qq邮箱");
}
else
{
Console.WriteLine("您输入的不是qq邮箱");
}
Console.WriteLine("请输入你的qq邮箱");
string yx = Console.ReadLine();
int a = yx.LastIndexOf("qq");
int b = yx.LastIndexOf("@");
if ((a - b) == 1)
{
Console.WriteLine("您输入的是qq邮箱");
}
else
{
Console.WriteLine("您输入的不是qq邮箱");
}
转载于:https://www.cnblogs.com/zzc134680/p/5416964.html