how to print the below in java?thanks in advance....
*
* *
* *
* *
*
Answer Posted / jitendra
for(i=1;i<=3;i++)
{
for(j=3;j>=i;j--)
System.out.printf(" ");
System.out.printf("*");
for(j=1;j<2+i;j++)
System.out.printf(" ");
System.out.printf("*");
System.out.printf("\n");
}
this is to print
*
* *
* *
now apply ur brain to print the rest...
any problem ..then mail me
jitendrasharma13@gmail.com
Is This Answer Correct ? | 2 Yes | 6 No |
Post New Answer View All Answers
Why string is a class?
What is the difference between numeric and integer?
What is charat ()?
what are the methods in object?
Is null in java?
Why is java so important?
What is bom encoding?
Write a program to find the whether a number is an Armstrong number or not?
Is assembly language a low level language?
These static constructors are correct ? class A { statc intA() { } static A(int x,int y) { } static A(int x) { } }
How do you find the independent variable?
What is google full form?
Explain the difference between throw and throws in java?
Can memory leak in java?
What is a lambda expression ? What's its use ?