08 2016 档案

摘要:/**算法:选择排序1,从当前未排序的正数中找一个最小的整数,将它放在已排序的整数列表的最后2.要点:选择排序选最小的,往左边选*/ #include <stdio.h>void SelectionBort(int *a,int n);int main(){ int k; int a[10]={2, 阅读全文
posted @ 2016-08-23 17:58 caocx 阅读(212) 评论(0) 推荐(0)
摘要:#include <stdio.h>void BubbleSort(int *a,int n);int main(void){ int arr[10] = {2,4,6,8,0,1,3,5,7,9}; int k; for(k=0;k<10;k++){ if(k==9) printf("%d\n", 阅读全文
posted @ 2016-08-23 11:06 caocx 阅读(197) 评论(0) 推荐(0)
摘要:#include <stdio.h>//这儿表示的函数的输入输出头文件void swap(int x,int y);void swap_p(int *x,int *y);//表示调用一个方法时必须声明这个方法的原型,否则不能调用(方法二)#define swap_m(x,y,t)((t)=(x),( 阅读全文
posted @ 2016-08-22 13:44 caocx 阅读(785) 评论(0) 推荐(0)
摘要:代码如下: package four.day8.com; public class Person { private String name;; private int age; public Person() { super(); } public Person(String name,int a 阅读全文
posted @ 2016-08-08 15:35 caocx 阅读(279) 评论(0) 推荐(0)
摘要:代码如下 Student.java package four.com; public class Student extends Person { // private String name; // private int age; public Student(){} public Studen 阅读全文
posted @ 2016-08-03 13:59 caocx 阅读(190) 评论(0) 推荐(0)