自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(3)
  • 收藏
  • 关注

原创 C语言编写:用递归方法求n!。

#include<stdio.h> int func(unsigned int x) { int f; if (x == 0 || x == 1 ) return 1; f = func(x-1)*x;//函数自己调用自己加粗样式 return f; } int main() { int func(); unsigned int x; printf("请输入一个数:\n"); scanf("%d",&x); printf("%d\n",func(x)); } ...

2021-01-15 21:40:30 1732

原创 C语言编写:用递归的方法求n!

C语言编写:用递归的方法求n! #include<stdio.h> int func(unsigned int i) { int f; if (i == 0 || i == 1 ) return 1; f = func(i-1)*i; //调用函数本身 return f; } int main( ) { int func(); unsigned int i; printf(“请输入一个数:\n”); scanf("%d\n",&i); printf("%d\n",func(i)); }

2021-01-15 21:17:48 4907 1

原创 去掉字符串里面相同的字符

C语言编写程序:去掉字符串里面相同的字符 #include <stdio.h> char *func(char *str)//char str[] 定义字符串可以用字符指针,也可以用数组 { int i=0,j=0,k=0; while(str[i] != ‘\0’) { j = i+1; //就从第二个字符开始遍历 while(str[j] != ‘\0’) { if(str[i] == str[j]) { k = j; while(str[k] != ‘\0’) { str[k] = str

2021-01-13 18:51:55 407

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除