回覆列表
  • 1 # 使用者7364316064609

    using System;

    using System.Collections.Generic;

    using System.Linq;

    using System.Text;

    namespace ConsoleApplication1

    {

    class Program

    {

    static void Main(string[] args)

    {

    Rectangle r = new Rectangle(10, 20);

    Console.WriteLine(r.area().ToString());

    Console.ReadKey();

    }

    class Rectangle {

    public double length;

    public double width;

    public Rectangle(double l,double w)

    {

    length = l;

    width = w;

    }

    public double area()

    {

    return length * width;

    }

    }

    }

    }

  • 中秋節和大豐收的關聯?
  • 說說遼籃最近怎麼樣?