• 整理—类型转换


    using System; 
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    
    namespace ConsoleApplication1
    {
        class Program
        {
            static void Main(string[] args)
            {
                /* int a;
                a = 1;
                int b = 3;
                int c = a + b;
                Console.WriteLine(c);
                Console.ReadLine(); */
    
                /* Console.WriteLine("请输入变量a的值");
                 string a=Console.ReadLine ();
                 Console.WriteLine ("请输入变量b的值");
                 string b=Console.ReadLine();
                 Console.WriteLine ("a+b的和为:");
                 Console.WriteLine(a+b);
              
                  /*int a1=int.Parse (a);
                  int b1=int.Parse (b);
                  int c=a1+b1;
                  Console.WriteLine (c);
                  Console.ReadLine ();*/
    
                /* Console.ReadLine();
                 int a1 = int.Parse(a);
                 int b1 = Convert.ToInt16(b);
                 int c = a1 + b1;
                 Console.WriteLine(c);*/
    
                /*double a1 = double.Parse(a);
                double b1 = Convert.Todouble16(b);
                double c = a1 + b1;
                Console.WriteLine(c);*/
                /*int a1 = int.Parse(a);
    
                int b1 = Convert.ToInt16(b);
                int c = a1 - b1;
                Console.WriteLine(c);*/
                /*double a1 = double.Parse(a);
                double b1 = Convert.Todouble16(b);
                double c = a1 * b1;
                Console.WriteLine(c);*/
                /*int a, b;
                a=6;
                b = 2;
                a = a - b;
                Console.WriteLine(a);*/
    
                /* int a=1;
                 int b = 2;
                 string s = a.ToString() + b.ToString();*/
                /* double a =1;
                 int b = 3;
                 double c = a + b;*/
                /* double a = 1.4;
                 int b = 4;
                 int c = (int)a + b;
    
                 Console.WriteLine(c);
    
               
    
                
    
                 Console.ReadLine();*/
  • 相关阅读:
    1216
    构建之法 1 2 3
    复利计算
    实验总结
    0916编译原理第二次上机作业
    0909第一次作业
    linux 更新jdk
    Java中使用OpenSSL生成的RSA公私钥进行数据加解密
    quartz定时任务时间表达式说明
    IntelliJ IDEA使用说明
  • 原文地址:https://www.cnblogs.com/yg6405816/p/5365352.html
Copyright © 2020-2023  润新知