J
Javaunfreund
Gast
[JAVA=33]DecimalFormat df = new DecimalFormat("0.00"); // Ausgabeformat
System.out.println("a: "+ccount[0]+" "+df.format((ccount[0]*100)/laenge)+"%");
System.out.println("b: "+ccount[1]+" "+df.format((ccount[1]*100)/laenge)+"%");
System.out.println("c: "+ccount[2]+" "+df.format((ccount[2]*100)/laenge)+"%");
System.out.println("d: "+ccount[3]+" "+df.format((ccount[3]*100)/laenge)+"%");
System.out.println("e: "+ccount[4]+" "+df.format((ccount[4]*100)/laenge)+"%");
System.out.println("f: "+ccount[5]+" "+df.format((ccount[5]*100)/laenge)+"%");
System.out.println("g: "+ccount[6]+" "+df.format((ccount[6]*100)/laenge)+"%");
System.out.println("h: "+ccount[7]+" "+df.format((ccount[7]*100)/laenge)+"%");
System.out.println("i: "+ccount[8]+" "+df.format((ccount[8]*100)/laenge)+"%");
System.out.println("j: "+ccount[9]+" "+df.format((ccount[9]*100)/laenge)+"%");
System.out.println("k: "+ccount[10]+" "+df.format((ccount[10]*100)/laenge)+"%");
System.out.println("l: "+ccount[11]+" "+df.format((ccount[11]*100)/laenge)+"%");
System.out.println("m: "+ccount[12]+" "+df.format((ccount[12]*100)/laenge)+"%");
System.out.println("n: "+ccount[13]+" "+df.format((ccount[13]*100)/laenge)+"%");
System.out.println("o: "+ccount[14]+" "+df.format((ccount[14]*100)/laenge)+"%");
System.out.println("p: "+ccount[15]+" "+df.format((ccount[15]*100)/laenge)+"%");
System.out.println("q: "+ccount[16]+" "+df.format((ccount[16]*100)/laenge)+"%");
System.out.println("r: "+ccount[17]+" "+df.format((ccount[17]*100)/laenge)+"%");
System.out.println("s: "+ccount[18]+" "+df.format((ccount[18]*100)/laenge)+"%");
System.out.println("t: "+ccount[19]+" "+df.format((ccount[19]*100)/laenge)+"%");
System.out.println("u: "+ccount[20]+" "+df.format((ccount[20]*100)/laenge)+"%");
System.out.println("v: "+ccount[21]+" "+df.format((ccount[21]*100)/laenge)+"%");
System.out.println("w: "+ccount[22]+" "+df.format((ccount[22]*100)/laenge)+"%");
System.out.println("x: "+ccount[23]+" "+df.format((ccount[23]*100)/laenge)+"%");
System.out.println("y: "+ccount[24]+" "+df.format((ccount[24]*100)/laenge)+"%");
System.out.println("z: "+ccount[25]+" "+df.format((ccount[25]*100)/laenge)+"%");
System.out.println("ä: "+ccount[26]+" "+df.format((ccount[26]*100)/laenge)+"%");
System.out.println("ö: "+ccount[27]+" "+df.format((ccount[27]*100)/laenge)+"%");
System.out.println("ü: "+ccount[28]+" "+df.format((ccount[28]*100)/laenge)+"%");
System.out.println("ß: "+ccount[29]+" "+df.format((ccount[29]*100)/laenge)+"%");
System.out.println("?: "+x+" "+df.format((x*100)/laenge)+"%");
input.close()[/code]
Liebe Gemeinde?
Daraus eine Schleife zu basteln erscheint mir unmöglich... kann mir jemand vl helfen?
mfg
Der Javaunfreund
System.out.println("a: "+ccount[0]+" "+df.format((ccount[0]*100)/laenge)+"%");
System.out.println("b: "+ccount[1]+" "+df.format((ccount[1]*100)/laenge)+"%");
System.out.println("c: "+ccount[2]+" "+df.format((ccount[2]*100)/laenge)+"%");
System.out.println("d: "+ccount[3]+" "+df.format((ccount[3]*100)/laenge)+"%");
System.out.println("e: "+ccount[4]+" "+df.format((ccount[4]*100)/laenge)+"%");
System.out.println("f: "+ccount[5]+" "+df.format((ccount[5]*100)/laenge)+"%");
System.out.println("g: "+ccount[6]+" "+df.format((ccount[6]*100)/laenge)+"%");
System.out.println("h: "+ccount[7]+" "+df.format((ccount[7]*100)/laenge)+"%");
System.out.println("i: "+ccount[8]+" "+df.format((ccount[8]*100)/laenge)+"%");
System.out.println("j: "+ccount[9]+" "+df.format((ccount[9]*100)/laenge)+"%");
System.out.println("k: "+ccount[10]+" "+df.format((ccount[10]*100)/laenge)+"%");
System.out.println("l: "+ccount[11]+" "+df.format((ccount[11]*100)/laenge)+"%");
System.out.println("m: "+ccount[12]+" "+df.format((ccount[12]*100)/laenge)+"%");
System.out.println("n: "+ccount[13]+" "+df.format((ccount[13]*100)/laenge)+"%");
System.out.println("o: "+ccount[14]+" "+df.format((ccount[14]*100)/laenge)+"%");
System.out.println("p: "+ccount[15]+" "+df.format((ccount[15]*100)/laenge)+"%");
System.out.println("q: "+ccount[16]+" "+df.format((ccount[16]*100)/laenge)+"%");
System.out.println("r: "+ccount[17]+" "+df.format((ccount[17]*100)/laenge)+"%");
System.out.println("s: "+ccount[18]+" "+df.format((ccount[18]*100)/laenge)+"%");
System.out.println("t: "+ccount[19]+" "+df.format((ccount[19]*100)/laenge)+"%");
System.out.println("u: "+ccount[20]+" "+df.format((ccount[20]*100)/laenge)+"%");
System.out.println("v: "+ccount[21]+" "+df.format((ccount[21]*100)/laenge)+"%");
System.out.println("w: "+ccount[22]+" "+df.format((ccount[22]*100)/laenge)+"%");
System.out.println("x: "+ccount[23]+" "+df.format((ccount[23]*100)/laenge)+"%");
System.out.println("y: "+ccount[24]+" "+df.format((ccount[24]*100)/laenge)+"%");
System.out.println("z: "+ccount[25]+" "+df.format((ccount[25]*100)/laenge)+"%");
System.out.println("ä: "+ccount[26]+" "+df.format((ccount[26]*100)/laenge)+"%");
System.out.println("ö: "+ccount[27]+" "+df.format((ccount[27]*100)/laenge)+"%");
System.out.println("ü: "+ccount[28]+" "+df.format((ccount[28]*100)/laenge)+"%");
System.out.println("ß: "+ccount[29]+" "+df.format((ccount[29]*100)/laenge)+"%");
System.out.println("?: "+x+" "+df.format((x*100)/laenge)+"%");
input.close()[/code]
Liebe Gemeinde?
Daraus eine Schleife zu basteln erscheint mir unmöglich... kann mir jemand vl helfen?
mfg
Der Javaunfreund