c的基础练习
cexo-l
这个作者很懒,什么都没留下…
展开
-
冒泡排序及二分查找
#include<stdio.h>#define SIZE 6void bubbleSort(int b[]);int bianySearch(int searchKey, int b[], int high, int low);int main(void){ int i, element, key; int a[SIZE]; for (int i = 0; i <...原创 2019-05-19 00:33:33 · 160 阅读 · 0 评论 -
Fibonacci数列
//使用数组#include <stdio.h>#include <math.h>int a[50];int main(){ int i; int n; scanf_s("%d", &n); a[0] = 1; a[1] = 1; for (i = 2; i <n; i++) { a[i] = a[i - 1] + a[i - 2]...原创 2019-05-20 23:49:41 · 79 阅读 · 0 评论