Exercise 2-8.
来源:互联网 发布:数据库设计思路与原则 编辑:程序博客网 时间:2024/06/05 00:29
Exercise 2-8.Write a function rightrot(x,n) that returns the value of the integer x rotated
to the right b y npositions.
int unsignedLength(){unsigned x = (unsigned)~0;int i = 0;while (x != 0){x = x >> 1;i++;}return i;}unsigned rightrot(unsigned x, int n){int l = unsignedLength();int a, b, c;a = (~0) >> (l - n) | x;b = x >> n;c = a << (l - n);return b | c;}
0 0
- Exercise 2-8.
- Exercise of Thread(2)
- Exercise 2-3
- Python Exercise #2
- Exercise 2: Linear Regression
- Exercise 2: Linear Regression
- Exercise(19):排列2
- 37-1-2-exercise
- 38-2- lesson exercise
- Exercise 2.2-2
- PATA-Exercise No.2
- Exercise
- exercise
- Exercise
- exercise
- APUE.2e exercise 6.3
- 算法导论 Exercise 4.2-2
- C程序设计语言 Exercise 2-9
- xcode常见的几种设置说明
- Unicode与中文转化
- .m中@interface部分的作用
- instanceof与isInstance,isAssignableFrom
- RGB和CIEXYZ颜色空间的转换及相关优化
- Exercise 2-8.
- Java String.trim () 函数的使用
- UIDocumentInteractionController 第三方应用中打开自己的文件 方法
- java collection
- java继承中,成员变量的覆盖
- hadoop,用户制定类
- UiAutomator2自动化测试环境搭建
- Android获取电池电量的三种方法
- hdu 1069 Monkey and Banana