Forums » .NET » ASP.NET »

How to Create Measurment application for rectanle,square etc using

Posted Date: 20 Feb 2012      Posted By:: vijay Profile photo    Member Level: Gold    Member Rank: 1753     Points: 2   Responses: 2

How to Create Measurment application for rectanle,square,circle angle and other measurements using can any tell me any site or code..


#658133    Author: PalaniKumar.A      Member Level: Gold      Member Rank: 265     Date: 20/Feb/2012   Rating: 2 out of 52 out of 5     Points: 4


Sample code for rectangle,square,circle to find area..
It will help to develop application..

class Area
public Area(double x, double y)
double res = .5 * x * y;
Console.WriteLine("Area of triangle "+res);

public Area(int x, int y)
int res = x * y;
Console.WriteLine("Area of Rectangle "+res);

static void Main(string[] args)
Area obj = new Area(20.50, 50.10);
obj = new Area(10,10);

For Circle:

radius = input ("Please Enter The Radius Of The Circle")
area = int(radius)**2*3.14
print ("The area of the circle with radius", radius, "is", area)

To Find area of polygon :

public class Area
public static double AreaPolygon(int[] x, int[] y, int noOfPoints)
double area = 0;
for (int i = 0; i < noOfPoints; i++)
area = area + ((x[i] * y[i+1]) - (x[i + 1] * y[i]))
area = area * 0.5;
return area;

public static double AreaTriangle(int b, int h)
return (b * h) * 0.5;

public static double AreaRectangle(int l, int h)
return (l * h);

$-Success is often the result of taking a misstep in the right direction-$

#658179    Author: Asheej T K        Member Level: Diamond      Member Rank: 2     Date: 20/Feb/2012   Rating: 2 out of 52 out of 5     Points: 2


What you wanted to measure and how you wanted to measure? Please explain your requirement properly. If it is calculating the area then it is just a mathematical calculation.

Asheej T K
Microsoft MVP[ASP.NET/IIS]
DotNetSpider MVM

Post Reply

 This thread is locked for new responses. Please post your comments and questions as a separate thread.
If required, refer to the URL of this page in your new post.

Next : Access control inside content place hoder using javascript (Urgent)
Previous : How to solve this My Sql Bug
Return to Discussion Forum
Post New Message
Category: ASP.NET

Related Messages

Subscribe to Subscribers
Awards & Gifts
Talk to Webmaster Tony John

Online Members

Copyright © SpiderWorks Technologies Pvt Ltd., Kochi, India