- Home
- Geometric shapes
- Triangle Rectangle

Tuesday, October 31, 2023
⁃
Difficulty:
Intermediate

Write a Java program that prompts the user for two integers, the first being an integer `x`

which is used to draw the area of the right triangle on the screen.

The second integer will be the `width`

of the triangle. The height of the triangle will always be the same as the width.

0 5

00000 0000 000 00 0

Share it on your social media and challenge your friends to solve programming problems. Together, we can learn and grow.

The code has been successfully copied to the clipboard.

Continue improving your Java programming skills with our selection of practical exercises from the lesson. Click on Practice and challenge your knowledge!

Practice with exercises in Java to create geometric shapes of different types.