using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Hello_world
{
internal class Program
{
static void Main(string[] args)
{
Console.WriteLine("面包店正在打折,活动进行中......");
Console.Write("请输入星期:");
string strWeek = Console.ReadLine(); //字符串变量记录,Console.ReadLine()会等待直到用户按下回车,一次读入一行
Console.Write("请输入时间:");
int intTime =Convert.ToInt32 ( Console.ReadLine()); //Console.ReadLine()输入的是字符串,Time定义为int需要进行类型转换
if ((strWeek == "星期三" && (intTime >= 19 || intTime <= 22)) || (strWeek == "星期六" && (intTime >= 17 || intTime <= 20)))
{
Console.WriteLine("恭喜您获得了折扣资格,请尽情选购吧!");
}
else
{
Console.WriteLine("不好意思,您来晚了一步,赠送您20元代金券,期待您的下次光临!");
}
Console.ReadLine();//定位控制台
}
}
}