论坛的帖子怎么删除:C#代码之plane
来源:百度文库 编辑:九乡新闻网 时间:2024/10/05 22:57:55
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;namespace plane
{
class Program
{
static void Main(string[] args)
{
double yuanPrize = 4000;//机票的原价
int Month = DateTime.Now.Month;//获取当前的月份 if (Month >= 5 && Month <= 10)
{
Console.WriteLine("请选择机舱类型:1表示头等舱,2表示经济舱");
string select = Console.ReadLine();
if (select == "1")
{
Console.WriteLine("你的机票价格为:{0}", yuanPrize * 0.9);
}
else if (select == "2")
{
Console.WriteLine("你的机票价格为:{0}", yuanPrize * 0.75);
}
else
{
Console.WriteLine("输入非法!");
}
}
else
{
Console.WriteLine("请选择机舱类型:1表示头等舱,2表示经济舱");
string select = Console.ReadLine();
if (select == "1")
Console.WriteLine("你的机票价格为:{0}", yuanPrize * 0.6);
else if (select == "2")
Console.WriteLine("你的机票价格为:{0}", yuanPrize * 0.3);
else
{
Console.WriteLine("输入非法!");
}
}
}
}
}
using System.Collections.Generic;
using System.Linq;
using System.Text;namespace plane
{
class Program
{
static void Main(string[] args)
{
double yuanPrize = 4000;//机票的原价
int Month = DateTime.Now.Month;//获取当前的月份 if (Month >= 5 && Month <= 10)
{
Console.WriteLine("请选择机舱类型:1表示头等舱,2表示经济舱");
string select = Console.ReadLine();
if (select == "1")
{
Console.WriteLine("你的机票价格为:{0}", yuanPrize * 0.9);
}
else if (select == "2")
{
Console.WriteLine("你的机票价格为:{0}", yuanPrize * 0.75);
}
else
{
Console.WriteLine("输入非法!");
}
}
else
{
Console.WriteLine("请选择机舱类型:1表示头等舱,2表示经济舱");
string select = Console.ReadLine();
if (select == "1")
Console.WriteLine("你的机票价格为:{0}", yuanPrize * 0.6);
else if (select == "2")
Console.WriteLine("你的机票价格为:{0}", yuanPrize * 0.3);
else
{
Console.WriteLine("输入非法!");
}
}
}
}
}
C#代码之plane
C#线程暂停与开启的代码
C#入门的一些代码二
如何在*.aspx页面中直接嵌入C#代码
C#实现汉字转换为拼音缩写的代码
C#连接六类数据库的代码集
C#多线程编程之Thread类
C#进行MapX二次开发之MapX基础知识
Delphi与C#之父:安德斯
网站安全性:C#防SQL注入代码的实现方法 - 51CTO.COM
C# 清理IE缓存文件实例代码-程序开发-红黑联盟
C# 清理Cookies文件实例代码-程序开发-红黑联盟
C#学习之接口 - Michael Xu - 博客园
Visual C#网络编程之TCP--51编程网
C#发现之旅第十讲 文档对象模型
C#技术漫谈之垃圾回收机制(GC)
代码之二2
代码之二
代码讲解之二
代码之二
【博客代码】在线书架代码之三
C#遍历整个文件夹及子目录的文件代码,.Net技术文章,Asp.net系列教程,Asp.n...
关于c#
数据结构-C#