Drawing a triangle

I've been asked to draw a triangle of stars inside a list box. but so far i cannot seem to get it write. I want to cnvert this code into a vb code
//java
public static void main(String[] args) {
// TODO code application logic here
try{
BufferedReader object = new BufferedReader(new InputStreamReader(System.in));
System.out.println("enter the number");
int a= Integer.parseInt(object.readLine());
for (int i=1; i<a;i++ ){
for (int j=1; j<=i;j++ ){
System.out.print("*");
}
System.out.println("");
}
}
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories