Wednesday, October 21, 2009

Please give me da java code to obtain following out put using loops?

output is


*


**


***


****


***


**


*


instead of using


System.out.println(*);


System.out.println(**);


for all lines give me the codes in java using loops ,while,if,ifelse switch

Please give me da java code to obtain following out put using loops?
This isn't a question; it's a demand! ("give me ...") (even with "please" at the beginning and a "?" at the end, it's still not a question!)





3 possible solutions:


1. Ask your teacher


2. Ask your classmates


3. Hire a tutor





But above all else, DO YOUR OWN HOMEWORK!





Don't try to cheat on this, because when you NEED to do something, you'll be stuck on your own without help, THEN where will you be?
Reply:...


public static void xxx(){





String a="****";


for(int i=1;i%26lt;5;i++)


System.out.println( a.substring( 0,i) );


for (int i=3;i%26gt;0;i--)


System.out.println( a.substring( 0,i));}



home theater

No comments:

Post a Comment