Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package myPkg;
- import java.util.Scanner;
- public class Ex01 {
- public static void main(String[] args) {
- int x;
- Scanner in = new Scanner(System.in);
- System.out.println("Enter a number: ");
- x = in.nextInt();
- x = x * 2;
- System.out.println("the result is: " +x);
- in.close();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement