using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
class rect
{
int width;
int height;
public rect(int w, int h)
{
this.width = w;
this.height = h;
}
public int area()
{
return this.width * this.height;
}
}
class Program
{
static void Main(string[] args)
{
rect r = new rect(4,5);
Console.WriteLine(r.area());
Console.ReadLine();
}
}
}
//20
No comments:
Post a Comment