![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
The C Programming Language
文章平均质量分 65
waten
这个作者很懒,什么都没留下…
展开
-
在S1字符串中删除S2字符串出现过的任意字符
Description: 在S1字符串中删除S2字符串出现过的任意字符 ; Input: 无输入 Output: 除掉S1中的S2出现过的任意字符; S1: waten && sherry! S2: love Sample Output: watn && shrry! Code: #include #include #include int main() {原创 2014-01-17 19:55:23 · 1955 阅读 · 0 评论 -
比较三个数的大小
Description:比较三个数的大小; Input: 任意的三个数; Output:按大小顺序排列; Sample Input : 3 4 2 Sample Output: 2 2 4 Method: 1-按照顺序比较:(A B) (A C) (B C),若前者大于后者就交换,否者不交换。最终按顺序输出; 2-找出最大值和最小值,最终按顺序输出原创 2014-01-17 23:51:35 · 1426 阅读 · 0 评论 -
统计整型值的二进制为1的个数
Description:统计 整型值的 二进制 为1 的个数; Input: 任意整型数; Output:二进制的个数; Sample Input : 4 Sample Output: bitcount=1 Code1 要比 Code性能好,如截图所示: Code1: #include int bitcount( unsigned x ) { int b ; for( b原创 2014-01-18 19:06:01 · 668 阅读 · 0 评论