Chinaunix首页 | 论坛 | 博客
  • 博客访问: 21929
  • 博文数量: 10
  • 博客积分: 251
  • 博客等级: 二等列兵
  • 技术积分: 125
  • 用 户 组: 普通用户
  • 注册时间: 2011-02-10 16:30
文章分类
文章存档

2011年(10)

我的朋友
最近访客

分类: 嵌入式

2011-06-24 18:15:59

  1. /*
  2.  * 引用PresentationCore\PresentationFramework\System\Windows
  3.  * 代码文件JustDoIt.cs
  4.  */

  5. using System;
  6. using System.Windows;

  7. public class Addition
  8. {
  9.     public static void Main()
  10.     {
  11.         int number1, number2;
  12.         int sum;

  13.         Console.WriteLine("{0}", "Please enter the first integer:");
  14.         number1 = Convert.ToInt32(Console.ReadLine());

  15.         Console.WriteLine("{0}", "Please enter the second integer:");
  16.         number2 = Convert.ToInt32(Console.ReadLine());

  17.         sum = number1 + number2;
  18.         Console.WriteLine("{0} + {1} = {2}.", number1, number2, sum);

  19.         Application app = new Application();
  20.         app.Run();
  21.     }
  22. }
How to use the "Convert"?
阅读(640) | 评论(0) | 转发(0) |
0

上一篇:没有了

下一篇:C# 名字空间

给主人留下些什么吧!~~