使用軟體: Visual c# 2008 Express
-----------------------------------
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
    class conversion
    {
        static void Main(string[] args)
        {
            int a = 10;
            double b = 0;
            b = a;
            b = 20.5;
            a = (int)b;
            Console.WriteLine("a = " + a);
            Console.WriteLine("b = " + b);
            float c = 20;
            c = 20.5f;
            c = (float)20.5;
            Console.WriteLine("c = " + c);
            char d = (char)65;
            Console.WriteLine("d = " + d);
            Console.ReadLine();
           
                      
        }
    }
}
conversion
標籤: C#
訂閱:
張貼留言 (Atom)
 
 發表文章
發表文章
 
 


0 意見:
張貼留言