Privacy Policy Terms Of Use. Copyright © 2006-2010 Java Tutorials and Examples.
Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.
- /*
- Write a program to generate following pattern using for loop and
- if statement.
- 1
- 22
- 333
- 4444
- 55555
- 6666
- 777
- 88
- 9
- */
- public class iffor{
- public static void main(String args[]){
- for (int x=1; x<=9; x++){
- if(x<=5){
- for(int y=1; y<=x; y++){
- System.out.print(x);
- }
- System.out.println("");
- }
- else{
- for(int z=9; z>=x; z--){
- System.out.print(x);
- }
- System.out.println("");
- }
- }
- }
- }

buying phentermine without a
would you please explain line
Post new comment