using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApplication19
{
class Program
{
static void Main(string[] args)
{
Rectangle r = new Rectangle(4,3);
r.displayarea();
Console.ReadLine();
}
}
public struct Rectangle
{
int w, h;
public Rectangle(int h, int w)
{
this.h = h;
this.w = w;
}
public void displayarea()
{
Console.WriteLine("Area of Rectangle is "+(w*h));
}
}
}
No comments:
Post a Comment