Nov 1, 2014 at 9:46am UTC
how to check the if rectangle is a square or not?
Nov 1, 2014 at 9:56am UTC
Check if the side lengths are the same.
Nov 1, 2014 at 9:57am UTC
All it's sides have equal length.
Nov 1, 2014 at 2:50pm UTC
that i know but how to do the coding for that
Nov 1, 2014 at 3:01pm UTC
if (width==height) cout << "square\n";
How do you define your rectangle?
Nov 2, 2014 at 4:09am UTC
deleted:]
Last edited on Nov 2, 2014 at 3:21pm UTC
Nov 2, 2014 at 9:19am UTC
A square is a rectangle but a rectangle is not necessary a square.
Nov 2, 2014 at 2:23pm UTC
What kind of rectangle?
Are you using a 2D graphic engine?
Or is it just a console app?
And do you know the coordinates of the rectangle and the width/height of it?