23 lines
526 B
Plaintext
23 lines
526 B
Plaintext
import java.io.*;
|
|
|
|
public class BR {
|
|
public static void main(String args[]) throws IOException {
|
|
String speicher;
|
|
|
|
BufferedReader eingabe = new BufferedReader(new InputStreamReader(System.in));
|
|
|
|
System.out.print("Geben Sie Zahl: ");
|
|
|
|
speicher = eingabe.readLine();
|
|
try {
|
|
int zahl = Integer.parseInt(speicher);
|
|
System.out.println("Quadrat: " + (zahl*zahl));
|
|
} catch(NumberFormatException e) {
|
|
System.out.println("Geben Sie ganzzahlige zahl");
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
} |