5 static public char[][] text;
6 static public int letters;
7 final static int maxwidth = 200;
8 final static int maxheight = 200;
10 static public void main(java.lang.String [] argv) throws
11 FileNotFoundException, IOException {
16 FileInputStream input = new FileInputStream ("x.java");
17 PrintStream output = System.out;
19 output.println ("Ausgabe startet");
21 text = new char[maxheight][maxwidth];
22 output.println ("Feld angelegt");
24 for (l=0; l<maxheight; l++) for (c=0; c<maxwidth; c++)
33 while ( (i=input.read()) != -1) {
34 if (i == '\n') { c=0; l++; }
36 if (i == '\t') { c = ( (c/4 + 1) * 4); }
38 if (c<maxwidth && l<maxheight) {
41 if (c>=width) width=c+1;
42 if (l>=height) height=l+1;
48 } catch (Throwable e) { };
50 output.println ("------------------------------------------------------");
52 for (c=width-1; c>=0; c--) {
53 for (l=0; l<height; l++) {
54 if ( (a=text[l][c]) != ' ' ) letters ++;
61 output.println ("------------------------------------------------------");
62 output.println ("Abdruckbare Buchstaben im Text: " + Integer.toString(letters) );