Click here to Skip to main content
15,901,035 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
we input the points like (xi,yi), depending on number of points it has to caluclate area,permeter.
if i give two points it is line,if three points it is triangle,if 4 it is quadrilateral.
if one point&radius it caluclate circle area,permeter.
if we provide irrelevent data it has to give some alert message.
irrelevent data means istead of giving points if we give an other data like characters,numbers i.e:wrong input
Posted
Updated 7-Sep-11 3:01am
v2

1 solution

Define "irrelevant data".

With three or more points, it's impossible to have "irrelvant data". You can still calculate the area of the resulting shape by either considering the points in the order specified, or by "normalizing" the points so that the resulting shape is a closed-plane polygon.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900