zoukankan      html  css  js  c++  java
  • 数据类型

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    
    namespace ConsoleApplication2
    {
        class Program
        {
            static void Main(string[] args)
            {
                ////变量
                ////值类型
                ////整形:只能放整数
                //int a = 1;
                //a = 4;
                ////浮点型
                //double b = 3.14;
                //float c = 3.14F;
                //decimal d = 3.14M;
                ////布尔型,判断正确与否  只能存放true或者false
                //bool e = true;
                ////字符串类型
                //string f = "Hello world";
    
    
                ////常量,只允许取值,不允许重新赋值
                //const int g = 3;
                
    
                ////类型转换
                //double h = a;
                //a = (int)3.14;//显式转换
                //Console.WriteLine(a);
                //string i = a.ToString();//隐式转换
    
                ////Convert转换
                //a = Convert.ToInt32(3.14);
    
                //a = int.Parse("3.14");
                //int s= int.Parse(Console.ReadLine());
                //Console.ReadLine();
    
                Console.Write("请输入您的分数:");
                
                double score = double.Parse(Console.ReadLine());
                Console.WriteLine("您的"分数是"+(score+5));
                Console.ReadLine();
            }
        }
    }
  • 相关阅读:
    sql性能调优的注意项
    mybatis获取刚插入数据的ID
    mysql
    JQuery
    JS
    css
    web前端
    python爬虫
    socket编程
    python基础
  • 原文地址:https://www.cnblogs.com/tonyhere/p/5460892.html
Copyright © 2011-2022 走看看