Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenDocCN
beginnersbook-zh
提交
f133b307
B
beginnersbook-zh
项目概览
OpenDocCN
/
beginnersbook-zh
10 个月 前同步成功
通知
0
Star
107
Fork
30
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
B
beginnersbook-zh
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
f133b307
编写于
8月 14, 2019
作者:
W
wizardforcel
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
2019-08-14 18:12:07
上级
77296218
变更
44
隐藏空白更改
内联
并排
Showing
44 changed file
with
52 addition
and
52 deletion
+52
-52
docs/c-example/10.md
docs/c-example/10.md
+1
-1
docs/c-example/11.md
docs/c-example/11.md
+2
-2
docs/c-example/12.md
docs/c-example/12.md
+1
-1
docs/c-example/13.md
docs/c-example/13.md
+1
-1
docs/c-example/14.md
docs/c-example/14.md
+1
-1
docs/c-example/15.md
docs/c-example/15.md
+1
-1
docs/c-example/16.md
docs/c-example/16.md
+1
-1
docs/c-example/17.md
docs/c-example/17.md
+1
-1
docs/c-example/18.md
docs/c-example/18.md
+3
-3
docs/c-example/20.md
docs/c-example/20.md
+1
-1
docs/c-example/21.md
docs/c-example/21.md
+2
-2
docs/c-example/22.md
docs/c-example/22.md
+1
-1
docs/c-example/23.md
docs/c-example/23.md
+1
-1
docs/c-example/24.md
docs/c-example/24.md
+1
-1
docs/c-example/25.md
docs/c-example/25.md
+1
-1
docs/c-example/27.md
docs/c-example/27.md
+1
-1
docs/c-example/28.md
docs/c-example/28.md
+1
-1
docs/c-example/29.md
docs/c-example/29.md
+1
-1
docs/c-example/3.md
docs/c-example/3.md
+1
-1
docs/c-example/30.md
docs/c-example/30.md
+1
-1
docs/c-example/37.md
docs/c-example/37.md
+1
-1
docs/c-example/38.md
docs/c-example/38.md
+1
-1
docs/c-example/39.md
docs/c-example/39.md
+1
-1
docs/c-example/4.md
docs/c-example/4.md
+1
-1
docs/c-example/40.md
docs/c-example/40.md
+1
-1
docs/c-example/41.md
docs/c-example/41.md
+1
-1
docs/c-example/43.md
docs/c-example/43.md
+1
-1
docs/c-example/44.md
docs/c-example/44.md
+1
-1
docs/c-example/45.md
docs/c-example/45.md
+1
-1
docs/c-example/46.md
docs/c-example/46.md
+1
-1
docs/c-example/47.md
docs/c-example/47.md
+1
-1
docs/c-example/49.md
docs/c-example/49.md
+1
-1
docs/c-example/5.md
docs/c-example/5.md
+2
-2
docs/c-example/50.md
docs/c-example/50.md
+1
-1
docs/c-example/51.md
docs/c-example/51.md
+1
-1
docs/c-example/52.md
docs/c-example/52.md
+1
-1
docs/c-example/53.md
docs/c-example/53.md
+1
-1
docs/c-example/54.md
docs/c-example/54.md
+1
-1
docs/c-example/56.md
docs/c-example/56.md
+1
-1
docs/c-example/57.md
docs/c-example/57.md
+1
-1
docs/c-example/6.md
docs/c-example/6.md
+2
-2
docs/c-example/7.md
docs/c-example/7.md
+2
-2
docs/c-example/8.md
docs/c-example/8.md
+2
-2
docs/c-example/9.md
docs/c-example/9.md
+1
-1
未找到文件。
docs/c-example/10.md
浏览文件 @
f133b307
# C
计划检查阿姆斯特朗号码
# C
程序:检查阿姆斯特朗数
> 原文: [https://beginnersbook.com/2014/06/c-program-to-check-armstrong-number/](https://beginnersbook.com/2014/06/c-program-to-check-armstrong-number/)
...
...
docs/c-example/11.md
浏览文件 @
f133b307
# C 程序检查数字是否为回文数
# C 程序
:
检查数字是否为回文数
> 原文: [https://beginnersbook.com/2015/02/c-program-to-check-if-a-number-is-palindrome-or-not/](https://beginnersbook.com/2015/02/c-program-to-check-if-a-number-is-palindrome-or-not/)
如果数字保持不变,即使我们反转其数字,该数字也称为回文数。例如,12321 是回文数,因为如果我们反转它的数字它仍然是相同的。在本文中,我们共享了两个 C 程序来检查输入数字是否为回文数据。 1)使用 while 循环 2)使用递归。
#### 程序 1:使用
while
循环检查回文
#### 程序 1:使用
`while`
循环检查回文
```
/* Program to check if a number is palindrome or not
...
...
docs/c-example/12.md
浏览文件 @
f133b307
# C 程序查找给定范围内的回文数
# C 程序
:
查找给定范围内的回文数
> 原文: [https://beginnersbook.com/2015/02/c-program-to-find-palindrome-numbers-in-a-given-range/](https://beginnersbook.com/2015/02/c-program-to-find-palindrome-numbers-in-a-given-range/)
...
...
docs/c-example/13.md
浏览文件 @
f133b307
# C 程序检查数字是偶数还是奇数
# C 程序
:
检查数字是偶数还是奇数
> 原文: [https://beginnersbook.com/2015/02/c-program-to-check-if-number-is-even-or-odd/](https://beginnersbook.com/2015/02/c-program-to-check-if-number-is-even-or-odd/)
...
...
docs/c-example/14.md
浏览文件 @
f133b307
# C 程序查找字符的 ASCII 值
# C 程序
:
查找字符的 ASCII 值
> 原文: [https://beginnersbook.com/2017/09/c-program-to-find-ascii-value-of-a-character/](https://beginnersbook.com/2017/09/c-program-to-find-ascii-value-of-a-character/)
...
...
docs/c-example/15.md
浏览文件 @
f133b307
# C 程序
找到 int,float,double 和 char
的大小
# C 程序
:找到`int`,`float`,`double`和`char`
的大小
> 原文: [https://beginnersbook.com/2017/09/c-program-to-find-the-size-of-int-float-double-andchar_](https://beginnersbook.com/2017/09/c-program-to-find-the-size-of-int-float-double-and-char/)
...
...
docs/c-example/16.md
浏览文件 @
f133b307
# C 程序检查字母是元音还是辅音
# C 程序
:
检查字母是元音还是辅音
> 原文: [https://beginnersbook.com/2017/09/c-program-to-check-whether-an-alphabet-is-vowel-or-consonant/](https://beginnersbook.com/2017/09/c-program-to-check-whether-an-alphabet-is-vowel-or-consonant/)
...
...
docs/c-example/17.md
浏览文件 @
f133b307
# C
计划
检查闰年
# C
程序:
检查闰年
> 原文: [https://beginnersbook.com/2017/09/c-program-to-check-leap-year/](https://beginnersbook.com/2017/09/c-program-to-check-leap-year/)
...
...
docs/c-example/18.md
浏览文件 @
f133b307
# C 程序找到前 n 个自然数的和
# C 程序
:
找到前 n 个自然数的和
> 原文: [https://beginnersbook.com/2017/10/c-program-to-find-the-sum-of-first-n-natural-numbers/](https://beginnersbook.com/2017/10/c-program-to-find-the-sum-of-first-n-natural-numbers/)
...
...
@@ -8,7 +8,7 @@
1.
[
C 编程循环
](
https://beginnersbook.com/2014/01/c-for-loop/
)
2.
[
C 循环编程
](
https://beginnersbook.com/2014/01/c-while-loop/
)
## 示例 1:使用
for
循环查找自然数之和的程序
## 示例 1:使用
`for`
循环查找自然数之和的程序
用户输入 n 的值,程序使用 for 循环计算前 n 个自然数的总和。
...
...
@@ -39,7 +39,7 @@ Enter the value of n(positive integer): 6
Sum of first 6 natural numbers is: 21
```
## 示例 2:使用
while
循环查找自然数的总和
## 示例 2:使用
`while`
循环查找自然数的总和
```
#include <stdio.h>
...
...
docs/c-example/20.md
浏览文件 @
f133b307
# C 程序将大写字符串转换为小写字符串
# C 程序
:
将大写字符串转换为小写字符串
> 原文: [https://beginnersbook.com/2015/02/c-program-to-convert-uppercase-string-to-lowercase-string/](https://beginnersbook.com/2015/02/c-program-to-convert-uppercase-string-to-lowercase-string/)
...
...
docs/c-example/21.md
浏览文件 @
f133b307
# C
将小写字符串转换为大写字符串的程序
# C
程序:将小写字符串转换为大写字符串
> 原文: [https://beginnersbook.com/2015/02/c-program-to-convert-lowercase-string-to-uppercase-string/](https://beginnersbook.com/2015/02/c-program-to-convert-lowercase-string-to-uppercase-string/)
在以下程序中,将要求用户输入小写字符串,程序将其转换为大写字符串。程序中遵循的逻辑:所有小写字符(a 到 z)的 ASCII 值范围从 97 到 122,它们对应的大写字符(A 到 Z)的 ASCII 值比它们小 32。例如,'a'具有 ASCII 值 97,'A'具有 ASCII 值 65(97-32)。其他字母同样适用。基于这个逻辑,我们编写了以下 C 程序进行转换。
#### C 程序 - 将
String
从小写转换为大写
#### C 程序 - 将
字符串
从小写转换为大写
```
...
...
docs/c-example/22.md
浏览文件 @
f133b307
# C 程序按字母顺序对字符串集进行排序
# C 程序
:
按字母顺序对字符串集进行排序
> 原文: [https://beginnersbook.com/2015/02/c-program-to-sort-set-of-strings-in-alphabetical-order/](https://beginnersbook.com/2015/02/c-program-to-sort-set-of-strings-in-alphabetical-order/)
...
...
docs/c-example/23.md
浏览文件 @
f133b307
# C 程序在不使用函数 strlen()的情况下查找 String 的长度
# C 程序
:
在不使用函数 strlen()的情况下查找 String 的长度
> 原文: [https://beginnersbook.com/2015/02/c-program-to-find-the-length-of-a-string/](https://beginnersbook.com/2015/02/c-program-to-find-the-length-of-a-string/)
...
...
docs/c-example/24.md
浏览文件 @
f133b307
# C 程序在不使用 strcat 的情况下连接两个字符串
# C 程序
:
在不使用 strcat 的情况下连接两个字符串
> 原文: [https://beginnersbook.com/2015/02/c-program-to-concatenate-two-strings-without-using-strcat/](https://beginnersbook.com/2015/02/c-program-to-concatenate-two-strings-without-using-strcat/)
...
...
docs/c-example/25.md
浏览文件 @
f133b307
# C 程序使用递归来反转字符串
# C 程序
:
使用递归来反转字符串
> 原文: [https://beginnersbook.com/2014/06/c-program-to-reverse-a-string-using-recursion/](https://beginnersbook.com/2014/06/c-program-to-reverse-a-string-using-recursion/)
...
...
docs/c-example/27.md
浏览文件 @
f133b307
# C 程序按升序排列数字
# C 程序
:
按升序排列数字
> 原文: [https://beginnersbook.com/2015/02/c-program-to-arrange-numbers-in-ascending-order/](https://beginnersbook.com/2015/02/c-program-to-arrange-numbers-in-ascending-order/)
...
...
docs/c-example/28.md
浏览文件 @
f133b307
# C 程序查找数组的最大元素
# C 程序
:
查找数组的最大元素
> 原文: [https://beginnersbook.com/2015/02/c-program-to-find-largest-element-of-an-array/](https://beginnersbook.com/2015/02/c-program-to-find-largest-element-of-an-array/)
...
...
docs/c-example/29.md
浏览文件 @
f133b307
# C 程序使用指针,递归和扩展来查找数组元素的总和。功能
# C 程序
:
使用指针,递归和扩展来查找数组元素的总和。功能
> 原文: [https://beginnersbook.com/2014/06/c-program-to-find-sum-of-array-elements-using-pointers-recursion-functions/](https://beginnersbook.com/2014/06/c-program-to-find-sum-of-array-elements-using-pointers-recursion-functions/)
...
...
docs/c-example/3.md
浏览文件 @
f133b307
...
...
@@ -33,7 +33,7 @@ Hello World
4
\.
`return 0;`
- 如上所述,值 0 表示成功执行 main()函数。
## 示例 2:
使用
函数的 Hello World 程序
## 示例 2:
带有
函数的 Hello World 程序
让我们使用用户定义的函数查看相同的程序。在这个程序中,我们创建了一个函数 hello(),用于在屏幕上打印消息。我们在 main()函数中调用此函数。要了解用户定义的函数,请阅读本指南:
[
C
](
https://beginnersbook.com/2014/01/c-functions-examples/
)
中的用户定义函数。
...
...
docs/c-example/30.md
浏览文件 @
f133b307
# C 程序查找数组中的元素数
# C 程序
:
查找数组中的元素数
> 原文: [https://beginnersbook.com/2017/09/c-program-to-find-the-number-of-elements-in-an-array/](https://beginnersbook.com/2017/09/c-program-to-find-the-number-of-elements-in-an-array/)
...
...
docs/c-example/37.md
浏览文件 @
f133b307
# C 程序使用指针查找最大的三个数字
# C 程序
:
使用指针查找最大的三个数字
> 原文: [https://beginnersbook.com/2019/02/c-program-to-find-the-largest-of-three-numbers-using-pointers/](https://beginnersbook.com/2019/02/c-program-to-find-the-largest-of-three-numbers-using-pointers/)
...
...
docs/c-example/38.md
浏览文件 @
f133b307
# C 程序使用指针计算字符串中的元音和辅音
# C 程序
:
使用指针计算字符串中的元音和辅音
> 原文: [https://beginnersbook.com/2019/02/c-program-to-count-vowels-and-consonants-in-a-string-using-pointer/](https://beginnersbook.com/2019/02/c-program-to-count-vowels-and-consonants-in-a-string-using-pointer/)
...
...
docs/c-example/39.md
浏览文件 @
f133b307
# C 程序使用指针打印字符串
# C 程序
:
使用指针打印字符串
> 原文: [https://beginnersbook.com/2019/02/c-program-to-print-string-using-pointer/](https://beginnersbook.com/2019/02/c-program-to-print-string-using-pointer/)
...
...
docs/c-example/4.md
浏览文件 @
f133b307
# C 程序检查给定的整数是正还是负
# C 程序
:
检查给定的整数是正还是负
> 译文: [https://beginnersbook.com/2015/02/c-program-to-check-whether-the-given-integer-is-positive-or-negative/](https://beginnersbook.com/2015/02/c-program-to-check-whether-the-given-integer-is-positive-or-negative/)
...
...
docs/c-example/40.md
浏览文件 @
f133b307
# C 程序使用指针交换两个数字
# C 程序
:
使用指针交换两个数字
> 原文: [https://beginnersbook.com/2019/02/c-program-to-swap-two-numbers-using-pointers/](https://beginnersbook.com/2019/02/c-program-to-swap-two-numbers-using-pointers/)
...
...
docs/c-example/41.md
浏览文件 @
f133b307
# C 程序创建,初始化和访问指针变量
# C 程序
:
创建,初始化和访问指针变量
> 原文: [https://beginnersbook.com/2019/02/c-program-to-create-initialize-and-access-a-pointer-variable/](https://beginnersbook.com/2019/02/c-program-to-create-initialize-and-access-a-pointer-variable/)
...
...
docs/c-example/43.md
浏览文件 @
f133b307
# C 程序计算并打印 nPr 的值
# C 程序
:
计算并打印 nPr 的值
> 原文: [https://beginnersbook.com/2015/02/c-program-to-calculate-and-print-the-value-of-npr/](https://beginnersbook.com/2015/02/c-program-to-calculate-and-print-the-value-of-npr/)
...
...
docs/c-example/44.md
浏览文件 @
f133b307
# C 程序计算并打印 nCr 的值
# C 程序
:
计算并打印 nCr 的值
> 原文: [https://beginnersbook.com/2015/02/c-program-to-calculate-and-print-the-value-of-ncr/](https://beginnersbook.com/2015/02/c-program-to-calculate-and-print-the-value-of-ncr/)
...
...
docs/c-example/45.md
浏览文件 @
f133b307
# C 程序乘以两个浮点数
# C 程序
:
乘以两个浮点数
> 原文: [https://beginnersbook.com/2017/09/c-program-to-multiply-two-floating-point-numbers/](https://beginnersbook.com/2017/09/c-program-to-multiply-two-floating-point-numbers/)
...
...
docs/c-example/46.md
浏览文件 @
f133b307
# C 程序找到商和剩余
# C 程序
:
找到商和剩余
> 原文: [https://beginnersbook.com/2017/09/c-program-to-find-quotient-and-remainder/](https://beginnersbook.com/2017/09/c-program-to-find-quotient-and-remainder/)
...
...
docs/c-example/47.md
浏览文件 @
f133b307
# C 程序找到两个数字的平均值
# C 程序
:
找到两个数字的平均值
> 原文: [https://beginnersbook.com/2017/09/c-program-to-find-the-average-of-two-numbers/](https://beginnersbook.com/2017/09/c-program-to-find-the-average-of-two-numbers/)
...
...
docs/c-example/49.md
浏览文件 @
f133b307
# C 程序将二进制数转换为十进制数
# C 程序
:
将二进制数转换为十进制数
> 原文: [https://beginnersbook.com/2015/02/c-program-to-convert-binary-number-to-decimal-number/](https://beginnersbook.com/2015/02/c-program-to-convert-binary-number-to-decimal-number/)
...
...
docs/c-example/5.md
浏览文件 @
f133b307
# C 程序使用递归函数反转给定的数字
# C 程序
:
使用递归函数反转给定的数字
> 原文: [https://beginnersbook.com/2014/06/c-program-to-reverse-a-given-number-using-recursive-function/](https://beginnersbook.com/2014/06/c-program-to-reverse-a-given-number-using-recursive-function/)
...
...
@@ -44,7 +44,7 @@ Enter any number: 23456
After reverse the no is :65432
```
### 使用
While
循环反转数字
### 使用
`while`
循环反转数字
在上面的程序中,我们学习了如何使用递归函数反转数字。在这里,我们将学习如何使用 while 循环。
...
...
docs/c-example/50.md
浏览文件 @
f133b307
# C 程序将十进制数转换为二进制数
# C 程序
:
将十进制数转换为二进制数
> 原文: [https://beginnersbook.com/2017/09/c-program-to-convert-decimal-number-to-binary-number/](https://beginnersbook.com/2017/09/c-program-to-convert-decimal-number-to-binary-number/)
...
...
docs/c-example/51.md
浏览文件 @
f133b307
# C 程序将十进制数转换为八进制数
# C 程序
:
将十进制数转换为八进制数
> 原文: [https://beginnersbook.com/2017/09/c-program-to-convert-decimal-to-octal-number/](https://beginnersbook.com/2017/09/c-program-to-convert-decimal-to-octal-number/)
...
...
docs/c-example/52.md
浏览文件 @
f133b307
# C 程序将八进制数转换为十进制数
# C 程序
:
将八进制数转换为十进制数
> 原文: [https://beginnersbook.com/2017/09/c-program-to-convert-octal-number-to-decimal-number/](https://beginnersbook.com/2017/09/c-program-to-convert-octal-number-to-decimal-number/)
...
...
docs/c-example/53.md
浏览文件 @
f133b307
# C 程序将二进制转换为八进制数系统
# C 程序
:
将二进制转换为八进制数系统
> 原文: [https://beginnersbook.com/2017/09/c-program-to-convert-binary-to-octal-number-system/](https://beginnersbook.com/2017/09/c-program-to-convert-binary-to-octal-number-system/)
...
...
docs/c-example/54.md
浏览文件 @
f133b307
# C 程序将八进制数转换为二进制数
# C 程序
:
将八进制数转换为二进制数
> 原文: [https://beginnersbook.com/2017/09/c-program-to-convert-octal-number-to-binary-number/](https://beginnersbook.com/2017/09/c-program-to-convert-octal-number-to-binary-number/)
...
...
docs/c-example/56.md
浏览文件 @
f133b307
# C 程序计算圆的面积和周长
# C 程序
:
计算圆的面积和周长
> 原文: [https://beginnersbook.com/2014/06/c-program-to-calculate-area-and-circumference-of-circle/](https://beginnersbook.com/2014/06/c-program-to-calculate-area-and-circumference-of-circle/)
...
...
docs/c-example/57.md
浏览文件 @
f133b307
# C 程序计算等边三角形的面积
# C 程序
:
计算等边三角形的面积
> 原文: [https://beginnersbook.com/2014/06/c-program-to-calculate-area-of-equilatral-triangle/](https://beginnersbook.com/2014/06/c-program-to-calculate-area-of-equilatral-triangle/)
...
...
docs/c-example/6.md
浏览文件 @
f133b307
# C 程序
找到最多
的三个数字
# C 程序
:找到最大
的三个数字
> 原文: [https://beginnersbook.com/2014/06/c-program-to-find-greatest-of-three-numbers/](https://beginnersbook.com/2014/06/c-program-to-find-greatest-of-three-numbers/)
在本教程中,我们共享了一个程序,该程序比较三个输入整数并返回最大数字作为输出。为了进行这种比较,我们使用了一个简单的 if-elseif-else 块。
##
程序找到三个输入数字中的最大数字
##
找到三个输入数字中的最大数字的程序
该程序将提示用户输入三个整数,并根据输入,它将比较并显示最大数字作为输出。在这个程序 num1,num2
&
num3 是三个 int 变量,连续表示 number1,number2 和 number3。
...
...
docs/c-example/7.md
浏览文件 @
f133b307
# C
显示 Fibonacci 系列的程序
# C
程序:显示 Fibonacci 序列
> 原文: [https://beginnersbook.com/2014/06/c-program-to-display-fibonacci-series/](https://beginnersbook.com/2014/06/c-program-to-display-fibonacci-series/)
...
...
@@ -6,7 +6,7 @@
1)使用 For 循环
2)使用递归
###
Fibonacci 系列在 C 中使用循环
###
使用循环的 Fibonacci 序列
一个简单的 for 循环来显示系列。程序提示用户输入术语数,并显示具有相同术语数的系列。
...
...
docs/c-example/8.md
浏览文件 @
f133b307
# C
使用递归查找数字因子的程序
# C
程序:使用递归查找数字的阶乘
> 原文: [https://beginnersbook.com/2014/06/c-program-to-find-factorial-of-number-using-recursion/](https://beginnersbook.com/2014/06/c-program-to-find-factorial-of-number-using-recursion/)
该程序提示用户输入任何整数,找到输入数的阶乘,并在屏幕上显示输出。我们将使用递归用户定义函数来执行任务。这里我们有一个函数
`find_factorial`
,它以递归的方式调用自己来找出输入数的阶乘。我们在下面的程序中涉及用户交互,但是如果你不想要那个部分,那么你可以简单地为变量
`num`
分配一个整数值并忽略
`scanf`
语句。简而言之,您可以以任何您想要的方式调整它,每种情况的逻辑都是相同的。
###
程序找到阶乘
###
找到阶乘的程序
```
/* Program Name: Find Factorial
...
...
docs/c-example/9.md
浏览文件 @
f133b307
# C 程序查找给定范围内的素数
# C 程序
:
查找给定范围内的素数
> 原文: [https://beginnersbook.com/2014/06/c-program-to-find-prime-numbers-in-a-given-range/](https://beginnersbook.com/2014/06/c-program-to-find-prime-numbers-in-a-given-range/)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录