搜索资源列表
sushudui
- 编制函数prime,用来判断整数n是否为素数:bool prime(int n); 而后编制主函数,任意输入一个大于4的偶数n,找出满足n=i+j的所有数对,其中要求i与j均为素数(通过调用prime来判断素数)。如偶数18可以分解为11+7以及13+5;而偶数80可以分解为:43+37、61+19、67+13、73+7。-establishment prime function, used to judge whether the integer n is prime : bool prime
Hashtable
- 哈希表: HashTable H int s,a,n,w,i,q,t g=1 cout<<"输入元素个数n:\n" cin>>n InitList_H(H) for(i=0 i<16 i++) H.elem[i]=10000 for(i=0 i<n i++) {cout<<"输入你要输入的n个数:\n" cin>>s t=1 H.count++ if(H.e
int-linked-list
- 基于JAVA编写一个整数的链表。程序包括对dat文档读取,链表的添加,删除,和完成指定要求。-Write a program, using an IntLinkedList to read in the following file and create a list according to the rules specified. The first number is n = the number of elements to generate. In the example, this
CPP
- 10.编写一个程序,从键盘输入一批学生的成绩信息,每个学生的成绩信息包括:学号、姓名以及8门课的成绩。然后按照平均成绩由高到低顺序输出学生的学号、姓名以及平均成绩。 11.把在链表中插入一个新结点的操作写成一个函数: bool insert(Node *&h,int a,int pos) 其中,h为表头指针,a为要插入的结点的值,pos(≥0)表示插入位置。当pos为0时表示在表头插入;否则,表示在第pos个结点的后面插入。操作成功返回true,否则返回false。 12.把在
