import java.io.*; public class quadratzahl1 { public static void main(String[] args) throws IOException { int lauf; lauf=3; while(lauf<8) { System.out.print("Das Quadrat von " + lauf); System.out.println(" ist " + lauf*lauf + "."); ++lauf; // lauf = lauf + 1; } System.out.println("Ende."); } } ------------------------------ import java.io.*; public class quadratzahl2 { public static void main(String[] args) throws IOException { for(int lauf=3; lauf<8; ++lauf) { System.out.print("Das Quadrat von " + lauf); System.out.println(" ist " + lauf*lauf + "."); } System.out.println("Ende."); } } ------------------------------ import java.io.*; public class x_hoch_n { public static void main(String[] args) throws IOException { InputStreamReader roheingabe = new InputStreamReader(System.in); BufferedReader eingabe = new BufferedReader(roheingabe); double x, ergebnis; int lauf, n; System.out.print("Eingabe x:"); x = Double.parseDouble(eingabe.readLine()); System.out.print("Eingabe n:"); n = Integer.parseInt(eingabe.readLine()); if(x==0.0 && n<=0) { System.out.println("Falsche Eingabe: Programmabbruch!"); System.exit(1); } if(n<0) // z.B. x hoch -2 = 1 / x hoch 2 { x=1.0/x; n=-n; } ergebnis=1.0; lauf=0; while(lauf0) System.out.print(","); for(lauf=0; lauf