// See https://aka.ms/new-console-template for more information
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace demo1
{
class Program
{
static void Main(string[] args)
{
//int n = 100;
//double f = 3.14;
//decimal mymoney = 5000m;
//Console.WriteLine(n);
//Console.WriteLine(f);
//Console.WriteLine(mymoney);
//Console.WriteLine("d");
//Console.WriteLine('a');
//Console.ReadKey();
//int n1 = 50;
//int n2 = 20;
//n1 = n1 - n2;
//n2 = n1 + n2; // n2 = n1 - n2 + n2;
//n1 = n2 - n1; // n1 = n1 - n2 + n2 - n1 + n2;
//Console.WriteLine("交换后,n1={0},n2={0}", n1, n2);
//Console.ReadKey();

//Console.WriteLine("请输入你的姓名:");
//string name=Console.ReadLine();
//Console.WriteLine("你的姓名是:{0}", name);
//Console.ReadKey();
//Console.WriteLine("你喜欢吃什么水果:");
//string fruit = Console.ReadLine();
//Console.WriteLine("我也喜欢吃:{0}",fruit);
//Console.ReadKey();

//Console.WriteLine("你的姓名是:");
//string name = Console.ReadLine();
//Console.WriteLine("你的性别是:");
//string sex = Console.ReadLine();
//Console.WriteLine("你的年龄是:");
//string age = Console.ReadLine();
//Console.WriteLine("{0},你好,年龄是{1},是一个{2}生,", name, age, sex);
//Console.ReadKey();

//Console.WriteLine("你的年龄是:");
//string age = Console.ReadLine();//有这么一句,上面的打印输入才有效,底下要有接收的
//Console.ReadKey();

//转义字符,最终只是一个字符
//Console.WriteLine("今天是周一\n我需要上班"); //\n是换行
//Console.WriteLine("我想要输出一\"\"个英文的引号");// \"是一个英文的双引号
//\t表示一个tab键
//Console.WriteLine("人不\b楣,一樽还酹江月");//\b删掉前一个字符
////char c = '\b';
//string path = @"F:\music\ds\d\xiaozenaliya.jpg";
//Console.WriteLine(path);

// Console.WriteLine(@"谁怕,
//一蓑烟雨任平生");
// Console.ReadKey();

//算数运算符
//计算成绩的总分和平均值
//int chinese = 90;
//int math = 67;
//int english = 34;
//Console.WriteLine("总成绩是{0},平均成绩是{1}", chinese + math + english, (chinese + math + english) / 3);

//double pi = 3.14;
//int r = 5;
//double area = pi * r * r;
//double perimeter = 2 * pi * r;
//Console.WriteLine(area);
//Console.WriteLine(perimeter);
//等号两边的数据类型应当保持一致,如果不一致,发生以下条件将发生自动类型转换
//int和double兼容(都是数据类型)
//目标类型大于源类型
//int number = 10;
//double a = number;

//int T_shirt = 35;
//int trousers = 113;
//int totalMoney = 3 * T_shirt + 2 * trousers;
//Console.WriteLine(totalMoney);
//double realMoney = totalMoney * 0.88;
//Console.WriteLine(realMoney);
//Console.WriteLine(a);
//Console.ReadKey();

double a = 101.11;
int b = (int)a;

double c = 10;
int d = 3;
double e = c / d;
Console.WriteLine("{0:0.00}", e);//小数点后保留两位
Console.WriteLine(b);
Console.ReadKey();
}
}
}

//#region
//Console.ReadKey();
//#endregion

//Console.WriteLine("Hello, World!");
//Console.ReadKey();//暂停当前程序,等待用户按下任意键继续,按下的任意键将显示在控制台当中
//Console.WriteLine("我也是 hello world");
//Console.ReadKey();
//int number;