Example3_1
生活随笔
收集整理的這篇文章主要介紹了
Example3_1
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
import java.util.*;
public class Example3_1{
?public static void main(String args[]){
??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));
?}
}
轉載于:https://www.cnblogs.com/guoying/archive/2013/03/30/2990074.html
總結
以上是生活随笔為你收集整理的Example3_1的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: string::size_type
- 下一篇: win7局域网共享设置_分享几个简单实用