0
White a JAVA program to print out a triangle and calculate the area of the triangle based on the number of asterisks used
Java
3 odpowiedzi
+ 2
If the program is the one printing the thing, doesn't it have access to the sizes anyways?
+ 2
(Base*Height) / 2
Should be all you need.
0
The height and base of the triangle is dependent on the number of asterisks, the program has to print the asterisks in a triangle form before calculating the area.
Thanks @RrestoringFaith @JordanChapman