“Einfach ein einfaches Java -Programm schreiben, das eine Treppe oder eine Figur als Show druckt” Code-Antworten

Einfach ein einfaches Java -Programm schreiben, das eine Treppe oder eine Figur als Show druckt

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();
}
Uptight Unicorn

Einfach ein einfaches Java -Programm schreiben, das eine Treppe oder eine Figur als Show druckt

for(int row = 0; row < noOfLines; row++) {
    for(int col = 0; col < noOfLines; col++) {
        if(row >= col)
            System.out.print("*");
    }
    System.out.println();
}
Uptight Unicorn

Einfach ein einfaches Java -Programm schreiben, das eine Treppe oder eine Figur als Show druckt

    *    * *   * * *  * * * * * * * * *
Ugliest Unicorn

Ähnliche Antworten wie “Einfach ein einfaches Java -Programm schreiben, das eine Treppe oder eine Figur als Show druckt”

Fragen ähnlich wie “Einfach ein einfaches Java -Programm schreiben, das eine Treppe oder eine Figur als Show druckt”

Durchsuchen Sie beliebte Code-Antworten nach Sprache

Durchsuchen Sie andere Codesprachen