mmayoub

Ex02, 17.04.2021

Apr 20th, 2021
581
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //17.04.2021
  2. import java.util.Scanner;
  3.  
  4. public class Ex02 {
  5.  
  6.     public static void main(String[] args) {
  7.         // TODO Auto-generated method stub
  8.         Scanner in = new Scanner(System.in);
  9.  
  10.         int x;
  11.         int y;
  12.  
  13.         System.out.print("Enter a number: ");
  14.         x = in.nextInt();
  15.         // x=37;
  16.         y = x + 1;
  17.  
  18.         System.out.println(y);
  19.  
  20.         in.close();
  21.     }
  22. }
RAW Paste Data