Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

Why do we need hashset in java?

1099


What is a numeric digit?

1138


Explain spliterator in java8?

1099


How to pass arraylist to stored procedure in java?

1273


What is mean by encoding?

1125


How many bytes is double?

1049


What is externalizable interface?

1145


Is space a character in java?

1066


What is the difference between jvm and jre? What is an interface?

1153


Write the algorithm to check the number non-leaf nodes in a tree.

1126


What is the purpose of using break in each case of switch statement?

1069


When should you make a function static?

1034


What is the use of hashmap in java?

1136


List some important features of java 10 release?

1166


What is dot operator?

1095