摘要:
1 //#include <stdio.h> 2 //#include <ctype.h> 3 //#include <math.h> 4 //#include <stdlib.h> 5 //#include <time.h> 6 7 //int main() 8 //{ 9 10 /* 11 // 阅读全文
posted @ 2021-07-28 10:55
Bytezero!
阅读(166)
评论(0)
推荐(0)
摘要:
1 #include <stdio.h> 2 #include <stdlib.h> 3 #include <math.h> 4 //圆的面积 5 void calcCircle(); 6 //矩形的面积 7 void calcRectangle(); 8 //求1-100之间的偶数和 9 int 阅读全文
posted @ 2021-07-28 10:50
Bytezero!
阅读(51)
评论(0)
推荐(0)
摘要:
1 #include <stdio.h> 2 #include <stdlib.h> 3 4 5 6 int search(); 7 8 9 int main() 10 { 11 12 13 int index = search(); 14 printf("找到的元素的下标是:%d\n",index 阅读全文
posted @ 2021-07-28 10:45
Bytezero!
阅读(41)
评论(0)
推荐(0)
摘要:
1 ////实现pow函数 2 3 #include <stdio.h> 4 #include <stdlib.h> 5 double power(double,int) ; //函数原型 6 int main() 7 8 { 9 10 printf("%d的%d次幂等于: %.2lf\n",5,2 阅读全文
posted @ 2021-07-28 10:35
Bytezero!
阅读(203)
评论(0)
推荐(0)
摘要:
1 //函数调用 2 3 #include <stdio.h> 4 #include <stdlib.h> 5 #include <math.h> 6 //根据传入的半径,返回圆的面积 7 double calcCircle(double); 8 9 //要对用户输入进行非负的判断 10 int v 阅读全文
posted @ 2021-07-28 10:35
Bytezero!
阅读(38)
评论(0)
推荐(0)
摘要:
递归指的是在函数的定义中使用函数自身的方法。 举个例子:从前有座山,山里有座庙,庙里有个老和尚,正在给小和尚讲故事呢!故事是什么呢?"从前有座山,山里有座庙,庙里有个老和尚,正在给小和尚讲故事呢!故事是什么呢?'从前有座山,山里有座庙,庙里有个老和尚,正在给小和尚讲故事呢!故事是什么呢?……'" 例 阅读全文
posted @ 2021-07-28 10:15
Bytezero!
阅读(43)
评论(0)
推荐(0)
摘要:
任何一种编程中,作用域是程序中定义的变量所存在的区域,超过该区域变量就不能被访问。C 语言中有三个地方可以声明变量: 在函数或块内部的局部变量 在所有函数外部的全局变量 在形式参数的函数参数定义中 局部变量 在某个函数或块的内部声明的变量称为局部变量。它们只能被该函数或该代码块内部的语句使用。局部变 阅读全文
posted @ 2021-07-28 10:05
Bytezero!
阅读(171)
评论(0)
推荐(0)
摘要:
1 #include <stdio.h> 2 #include <stdlib.h> 3 4 int whileCount = 0; //全局变量,用来记while循环执行的轮数 5 //作用域只在当前的源文件 6 //extern int whileCount; //可以在其他源文件 引用 外部变 阅读全文
posted @ 2021-07-28 10:00
Bytezero!
阅读(142)
评论(0)
推荐(0)
摘要:
1 #include <stdio.h> 2 #include <stdlib.h> 3 4 //引用传递 传的地址 5 void change(int *); 6 7 void change(int *num) 8 { 9 *num +=1; 10 } 11 12 int main() 13 { 阅读全文
posted @ 2021-07-28 09:55
Bytezero!
阅读(49)
评论(0)
推荐(0)
摘要:
1 //书写一个小型的学生成绩管理系统 2 3 #include <stdio.h> 4 #include <stdlib.h> 5 #define N 5 6 //书写一个小型的学生成绩管理系统 7 void input(double []); 8 void sort(double []); 9 阅读全文
posted @ 2021-07-28 09:50
Bytezero!
阅读(98)
评论(0)
推荐(0)
浙公网安备 33010602011771号