English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

Write a method called bigRectangle that caculates the area of a rectangle and returns true if the area is greater than 100. The method should accept two parameters (length and width) of type float.

2007-11-12 04:30:06 · 5 answers · asked by Nick L 1 in Computers & Internet Programming & Design

5 answers

bool bigRectngle(float length, float width)
{
return (length*width > 100)
}

or
bool bigRectngle(float length, float width)
{
if (length*width > 100)
{
return true;
}else { return false}

}

2007-11-12 04:34:56 · answer #1 · answered by mhnd_79 3 · 1 0

In pseudo-code:

function boolean isBig( length, width )
{
If (length * width) > 100
then
return true;
else
return false;
}

2007-11-12 12:35:45 · answer #2 · answered by nonlinear 6 · 1 0

Hi. It would go something like:
Input l
Input W
Let A=L*W
If A>100 then Print "This is OK"

2007-11-12 12:37:28 · answer #3 · answered by Cirric 7 · 1 0

Can your write it in regular code?

2007-11-13 12:24:28 · answer #4 · answered by Doug G 1 · 0 0

you should specify which programming language you're talking about - there are dozens of them.

2007-11-12 12:35:04 · answer #5 · answered by piquet 7 · 1 1

fedest.com, questions and answers