Plz help. I am a rookie in Java programming and have a question on how to go by doing a while loop program.

Write a program which reads in the base and altitude of a triangle, computes the area, and prints the base, altitude and area of each in good form. Continue until the user enters a "-1" for the base.

I know the output is suppose to look like this:
Tri base altitude area
1 ## ## ##
2 ## ## ##

Thanks.