c语言
asty008
喜欢编程,网络和硬件
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
整数拆分
#include <stdio.h>int main(void){ int x,temp; int mask = 1; scanf("%d",&x); temp = x; while(temp>9) { temp /= 10; mask *= 10; } printf("mask=%d\n",mask); while(mask>0) { .原创 2020-12-09 22:40:40 · 148 阅读 · 0 评论 -
2020-10-27冒泡程序bubbleSort
#include<stdio.h>//冒泡程序bubbleSort(由小到大排序)void bubbleSort(int arr[],int Len){ int i,j,temp; for(i=0;i<Len;i++) { for(j=0;j<Len-1;j++) { if(arr[j]>arr[j+1]) { temp = arr[j]; arr[j] = arr[j+1]; arr[j+1] = temp; .原创 2020-10-27 22:53:48 · 159 阅读 · 0 评论
分享