囧。。老师都教C#快2个月了,一直在ACM那边,C#到今天才用VS完整编译第一道程序。囧。实在恶心。。现在是要看看工程这边了。也好把往事看淡一些~~~
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
int a, b, c;
Console.WriteLine("a: ");
a = int.Parse(Console.ReadLine());
Console.WriteLine("b: ");
b = int.Parse(Console.ReadLine());
c = a + b;
Console.WriteLine("a+b={0}",c);
Console.ReadKey();
}
}
}
//Console.ReadKey(); 相当于C++的getchar();方便看屏幕哦~~
//至于console.readline则是从屏幕读入字符串转换成int类型
本文记录了一位C#初学者在ACM训练中遇到的问题,以及如何在Visual Studio上完整编译并运行第一道程序的经历。通过实践,作者逐渐熟悉了编程环境,并分享了使用VS进行开发的心得。
949

被折叠的 条评论
为什么被折叠?



