Tell me the programme for this
@
1 2
@ @ @
1 2 3 4
Answer Posted / varun
public class HelloWorld{
public static void main(String []args){
int k=1;
for(int i=0;i<4;i++)
{
for(int j=0;j<=i;j++)
{
if(i%2==0)
System.out.print("@");
else
System.out.print(++k);
}
System.out.println();
k=0;
}
}
}
Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
How many digits can a float hold?
Can each java object keep track of all the threads that want to exclusively access it?
How do you remove an element from an arraylist in java?
What is the purpose of abstract class?
Is cout buffered?
Is ruby built on java?
What is byte value?
What is slash r?
how to split string in java?
Why is it important to initialize a variable?
Can java program run without jre?
What type of variable is gender?
Which is bigger float or double java?
Is singleton class immutable?
Is arraylist ordered in java?