Problem With Looping [JAVA]
lets say height is = 5
int height;
int x,y;
System.out.print("enter height: ");
height=SavitchIn.readLineIn();
for(x=1;x<=height;++x)
for(y=1;y<=x;++y)
if (y==x)
System.out.println("I");
else
System.out.print("I");
this is the output of that thing...
I
II
III
IIII
IIIII
but how about this one...
u may find it funny but can u make me a java script that will print this thing...
my teacher told me to make a java script using JCREATOR that will have an output just like this...
the number of I and dots will be based in the height given..
....I
...II
..III
.IIII
IIIII
badly need it :C