summaryrefslogtreecommitdiff
path: root/Java-Kompendium/kap5/Task2.java
blob: 751364ab3747e597362e17aa537e88b271fbf70c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import java.io.*;

public class Task2 {
    public static void main(String[] args) throws IOException {
        System.out.print("Geben Sie eine Zahl ein: ");

        var inputStream = new InputStreamReader(System.in);
        var bufferedStream = new BufferedReader(inputStream);

        String variable = bufferedStream.readLine();
        int converted = Integer.parseInt(variable);

        System.out.println("Der doppelte Wert ist: " + (converted * 2));
    }
}