zoukankan      html  css  js  c++  java
  • C#加减乘除

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    
    namespace Ch03Ex02
    {
        class Program
        {
            static void Main(string[] args)
            {
                double firstNumber, secondNumber;
                string userName;
    
                Console.WriteLine("请输入姓名:");
                userName = Console.ReadLine();
                Console.WriteLine("请输入第一个数字:");
                firstNumber = Convert.ToDouble(Console.ReadLine());
                Console.WriteLine("请输入第二个数字:");
                secondNumber = Convert.ToDouble(Console.ReadLine());
                Console.WriteLine("数字{0}加{1}结果是:{2}",firstNumber,secondNumber,firstNumber+secondNumber);
                Console.WriteLine("数字{0}减{1}结果是:{2}", firstNumber, secondNumber, firstNumber - secondNumber);
                Console.WriteLine("数字{0}乘{1}结果是:{2}", firstNumber, secondNumber, firstNumber * secondNumber);
                Console.WriteLine("数字{0}除{1}结果是:{2}", firstNumber, secondNumber, firstNumber / secondNumber);
                Console.WriteLine("数字{0}余{1}结果是:{2}", firstNumber, secondNumber, firstNumber % secondNumber);
    
                Console.ReadKey();
            }
        }
    }
    
    
    
  • 相关阅读:
    关于TNS_ADMIN环境变量
    Oracle Instant Client的安装和使用
    oracle 网络访问配置tnsnames.ora文件的路径
    sql优化(2)
    sql优化(1)
    mybatis的dao的注解
    配置nginx php上传大文件
    给Linux增加swap内存
    MQ选型之RabbitMQ
    Golang并发模型之Context详解
  • 原文地址:https://www.cnblogs.com/jiqing9006/p/6705465.html
Copyright © 2011-2022 走看看