ITeye博客

2-1 变量的赋值

kanglecjr · 2009-07-06 10:17 · C# · C · Linq · C++ · C# · Markdown

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace VarTest
{
    class Program
    {
        static void Main(string[] args)
        {
            string str;
            double Sum = 0, a, b, c;
            a = 20;
            b = 30;
            c = 40;
            Sum = a + b + c;
            str = "a+b+c=";
            Console.Write(str);
            Console.WriteLine("{0}",Sum);
            Console.WriteLine("{0}+{1}+{2}={3}", a, b, c, Sum);
            Console.ReadKey();
        }
    }
}


评论(1)

  1. #1 楼 · ray_linn · 2009-07-06 10:41

    我说话。。。我很努力的看了这个帖子。。。没发现它有任何价值。。。

评论功能维护中,当前仅展示历史评论。