![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
面试手写函数
json.yu
这个作者很懒,什么都没留下…
展开
-
计算1~n之间所有整数的阶乘之和(不用递归和数学公式)
用程序实现1!+2!+3!+...+n! #include <stdio.h> #include <stdlib.h> int main(int argc,char *argv[]){ unsigned long sum = 0; unsigned int jiecheng = 1; if (argc < 2){ printf("there mus...原创 2019-11-04 21:05:23 · 1005 阅读 · 0 评论 -
字符串或字符数组逆序
#include <stdio.h> #include <string.h> void swap(char str[], int i, int j)//交换字符数组中下标为i,j位置的两个字符 { char temp; temp = str[i]; str[i] = str[j]; str[j] = temp; } void StringReverse(c...原创 2019-09-27 21:43:03 · 524 阅读 · 0 评论