mmayoub

School11, 170910, Ex01

Sep 10th, 2017
160
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package myPkg;
  2.  
  3. import java.util.Scanner;
  4.  
  5. public class Ex01 {
  6.  
  7.     public static void main(String[] args) {
  8.         int x;
  9.  
  10.         Scanner in = new Scanner(System.in);
  11.         System.out.println("Enter a number: ");
  12.         x = in.nextInt();
  13.         x = x * 2;
  14.         System.out.println("the result is: " +x);
  15.        
  16.         in.close();
  17.         }
  18.  
  19. }
RAW Paste Data