C#输出早中晚,教科书的第一个程序
来源:互联网 发布:photoshopcs6 mac破解 编辑:程序博客网 时间:2024/05/16 16:01
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApplication1
{
public enum TimeofDay
{
Morning,
Afternoon,
Evening
}
class Program
{
static void WriteGreeting(TimeofDay timeofDay)
{
switch(timeofDay)
{
case TimeofDay.Morning:
Console.WriteLine("good morning!");
break;
case TimeofDay.Afternoon:
Console.WriteLine("good afternoon!");
break;
case TimeofDay.Evening:
Console.WriteLine("good evening!");
break;
}
}
static void Main(string[] args)
{
WriteGreeting(TimeofDay.Morning);
WriteGreeting(TimeofDay.Afternoon);
WriteGreeting(TimeofDay.Evening);
Console.Read();
}
}
}
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApplication1
{
public enum TimeofDay
{
Morning,
Afternoon,
Evening
}
class Program
{
static void WriteGreeting(TimeofDay timeofDay)
{
switch(timeofDay)
{
case TimeofDay.Morning:
Console.WriteLine("good morning!");
break;
case TimeofDay.Afternoon:
Console.WriteLine("good afternoon!");
break;
case TimeofDay.Evening:
Console.WriteLine("good evening!");
break;
}
}
static void Main(string[] args)
{
WriteGreeting(TimeofDay.Morning);
WriteGreeting(TimeofDay.Afternoon);
WriteGreeting(TimeofDay.Evening);
Console.Read();
}
}
}
0 0
- C#输出早中晚,教科书的第一个程序
- C#第一个程序 输出所有的水仙花数
- C#的第一个程序
- C#的第一个程序
- 第一个C#程序
- 第一个C#程序
- 第一个C#程序
- 第一个c#程序
- 第一个C#程序
- 我的第一个C#程序
- 我的第一个C#程序
- 第一个有意义的C#程序
- 第一个C#的控制台程序
- 我的第一个C#控制台程序
- 我的第一个C#程序
- 我的第一个C#程序
- 我的第一个C#程序
- C#2008的第一个程序HelloWord
- hbase shell&java 获取多版本的值
- 字符编码基础知识
- 手把手教你把Vim改装成一个IDE编程环境(图文)
- 【.bash_profile 与 .bashrc 的区别】
- Linux find 命令
- C#输出早中晚,教科书的第一个程序
- springmvc+mongodb+maven 项目搭建配置
- 蛇和梯子(bfs)
- iPhone开发之NSRunLoop的进一步理解
- OHCI、UHCI、EHCI
- hdu-1312 Red and Black
- 动态规划——最长回文子序列
- Android:关于国际化之后,ActionBar 出不来的问题!
- MD5加密应用