public class Buchstabenpyramide { public static void main (String args[]) { // character array mit 10 feldern anlegen char[] c = new char[10]; // felder mit h e l l o w o r l d füllen c[0] = 'h'; c[1] = 'e'; c[2] = 'l'; c[3] = 'l'; c[4] = 'o'; c[5] = 'w'; c[6] = 'o'; c[7] = 'r'; c[8] = 'l'; c[9] = 'd'; // Ausgabe wie bei Zahlenpyramide // h // he // hel // hell // ... // helloworld // extra gimmick: "Der Matrix Effekt" ;-) for (int zeile=0; zeile < c.length; zeile++) { for (int spalte= 0 ; spalte <= zeile ; spalte++) { // System.out.print(spalte); System.out.print(c[spalte]+" "); } System.out.println("_"); } } }