pxxfxxxxx

导航

2019年3月29日 #

山:以十进制转换为二进制为例

摘要: //以十进制转换为二进制为例 #include <stdio.h> void main() { int store[30]; int a,i=0; printf("ENTER A NUMBER,PLEASE:"); scanf("%d",&a); while(a!=0) { // 如果是八进制或十六 阅读全文

posted @ 2019-03-29 22:08 pxxfxxxxx 阅读(130) 评论(0) 推荐(0) 编辑

买东西打折switch

摘要: 注意switch的用法 阅读全文

posted @ 2019-03-29 21:43 pxxfxxxxx 阅读(215) 评论(0) 推荐(0) 编辑

冒泡排序对N个数由小到大排序

摘要: #include #define N 5 void main() { int a[N]; int i,j,temp; printf("请输入待排序的数据: \n"); for (i=0;ia[j+1]) { temp=a[j]; a[j]=a[j+1]; a[j+1]=temp; } pri... 阅读全文

posted @ 2019-03-29 21:40 pxxfxxxxx 阅读(3176) 评论(0) 推荐(0) 编辑