zoukankan      html  css  js  c++  java
  • 2015.3.3(上)

    练习题:

    (一)   1—100之间,输入两个数,算两个数之间的和?

    //Console.WriteLine("请输入一个整数");             //int a = Convert.ToInt32(Console.ReadLine());             //Console.WriteLine("请在输入一个整数");             //int b = Convert.ToInt32(Console.ReadLine());             //int x = 0;             //for (int i = a; i <=b; i++)             //{             //    x = x +i;             //}             //Console.WriteLine(x);             //Console.ReadLine();

    (二)  1—100之间,输入两个数,再输入一个符号,求(+,-,*,/)?

     //           Console.WriteLine("请输入一个数");  //           double c = Convert.ToDouble(Console.ReadLine());  //           Console.WriteLine("请在输入一个数");  //           double d = Convert.ToDouble(Console.ReadLine());  //           Console.WriteLine("请在输入一个运算符号(+,-,*,/)");  //           string y=Convert.ToString(Console.ReadLine());  //           double x = 0;              //               switch (y)  //    {               case "+":  //                       x=c+d;  //        break;  //                   case "-":  //                       x=c-d;  //                       break;  //                   case "*":  //                       x=c*d;  //                       break;  //                   case "/":  //                       x=c/d;  //                       break;  //       default:  //                       Console.WriteLine("你输入的有错误");  //break;  //    } Console.WriteLine(x);  //               Console.ReadLine();

  • 相关阅读:
    Cocostudio学习笔记(2) Button + CheckBox
    Oracle会话及连接数优化
    linux zip压缩和解压的各种操控
    Linux select 机制深入分析
    算法的时间复杂度
    findmaven的英文版本号上线了
    XML高速入门
    spring xml properties split with comma for list
    There is an error in invoking javac. A full JDK (not just JRE) is required
    [Swift]LeetCode134. 加油站 | Gas Station
  • 原文地址:https://www.cnblogs.com/m123/p/4310683.html
Copyright © 2011-2022 走看看