验证你的邮箱是不是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邮箱");
}

posted @ 2016-04-21 14:58  五月十九  阅读(236)  评论(0)    收藏  举报