IMS-java/Code/Steiner/30.8.23/src/App.java

18 lines
392 B
Java
Raw Normal View History

2024-06-24 08:18:59 +02:00
import java.util.Scanner;
public class App {
static Scanner scan = new Scanner(System.in);
public static void main(String[] args) throws Exception {
int myNumber = 12;
System.out.println("Please type a number to add:");
int numberToAdd = scan.nextInt();
myNumber += numberToAdd;
System.out.println(myNumber);
scan.close();
}
}