import java.util.*;
public class Example3_1{
public static void main(String arg[]){
Scanner reader=new Scanner(System.in);
System.out.println("输入待移位的int整型数:");
int x=reader.nextInt();
System.out.println("输入移位量:");
int n=reader.nextInt();
System.out.println("左移位的结果:"+(x<<n));
System.out.println("右移位的结果:"+(x>>n));
}
}