answersLogoWhite

0

If-Then statements are usually used in programming to make a decision. You usually wouldn't use a decision to make a calculation, unless you only wanted to calculate the area of the triangle IF the base was a certain size, for example.

The following Java code snippet means: IF the base of the triangle IS GREATER THAN 9 AND the height of the triangle IS GREATER THAN 6 THEN return (calculate) the area of the triangle (which is (1/2) * base * height).

if(base_of_triangle > 9 && height_of_triangle > 6){
return base_of_triangle * height_of_triangle * (1/2);
}

User Avatar

Wiki User

15y ago

What else can I help you with?

Related Questions

Which statement best describes the area of the triangle?

The squared area of a triangle is half of its base times its perpendicular height. Or as: 0.5*base*perpendicular height = area of a triangle


What is an inverse statement of if a triangle is an equilateral triangle?

"if a triangle is an equilateral triangle" is a conditional clause, it is not a statement. There cannot be an inverse statement.


What is 26-degrees north latitude from Fint Michigan?

fint or flint?


What is the statement if it is an equilateral triangle then it is isosceles?

A false statement


Dilating a triangle changes the shape of the triangle but does not change its shape True or false?

As written, the statement is false. You can't have it both ways. I suspect you meant to write that dilating a triangle changes the size or area of the triangle but does not change its shape. That would be true.


What is the contrapositive of the statement if it is an equilateral triangle then it is an isosceles triangle?

The contrapositive would be: If it is not an isosceles triangle then it is not an equilateral triangle.


A parallelogram and a triangle are shown. Which statement is true?

the triangle has the greater perimeter


What is the inverse of the statement A triangle is an acute triangle if it has three acute angles?

The triangle is slanted to the right


What is the FALSE statement about a triangle?

False: A triangle will only tessellate if it's in the form of an equilateral triangle.


What was the population in fint in 1963?

196,943


Do skai jackson fint?

heack to the no


Is this statement true or falseThe cicumcenter of a triangle is always in the interior of a triangle?

false