任继传吧 关注:4贴子:43
  • 1回复贴,共1

学了10课时 搞出点像样的玩意……

只看楼主收藏回复

C#


来自Android客户端1楼2014-12-23 01:05回复
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    namespace Plus
    {
    class Program
    {
    static void Main(string[] args)
    {
    Console.WriteLine("请输入A或者B");//屏幕输出
    int a, b;//定义两个整型变量
    Console.Write("A = ");
    a = Convert.ToInt32(Console.ReadLine());//用户输入
    Console.Write("B = ");
    b = int.Parse(Console.ReadLine());
    int c = a + b;//等量代换
    Console.WriteLine("{0} + {1} = {2}", a, b, c);//占位符
    Console.ReadKey();//the end
    }
    }
    }


    来自Android客户端2楼2014-12-23 01:09
    回复