Answers for "Simple Write a simple Java program that prints a staircase or a figure as show"

0

Simple Write a simple Java program that prints a staircase or a figure as show

for(int row = 0; row < noOfLines; row++) {
	for(int col = 0; col < noOfLines; col++) {
	    if(col < noOfLines - row -1)
	    	System.out.print(" ");
	    else
	    	System.out.print("#");
	}
	System.out.println();
}
Posted by: Guest on October-16-2021
0

Simple Write a simple Java program that prints a staircase or a figure as show

for(int row = 0; row < noOfLines; row++) {
    for(int col = 0; col < noOfLines; col++) {
        if(row >= col)
            System.out.print("*");
    }
    System.out.println();
}
Posted by: Guest on October-16-2021
0

Simple Write a simple Java program that prints a staircase or a figure as show

*    * *   * * *  * * * * * * * * *
Posted by: Guest on January-21-2021

Code answers related to "Simple Write a simple Java program that prints a staircase or a figure as show"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language